File: Makefile

package info (click to toggle)
frotz 2.40-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 468 kB
  • ctags: 891
  • sloc: ansic: 6,774; makefile: 143; sh: 63
file content (128 lines) | stat: -rw-r--r-- 3,392 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#Define your C compiler.  I recommend gcc if you have it.
#CC = gcc
#CC = cc

# Define your optimization flags.  Most compilers understand -O and -O2,
# Standard (note: Solaris on UltraSparc using gcc 2.8.x might not like this.)
OPTS = -O2 
# Pentium with gcc 2.7.0 or better
#OPTS = -O2 -fomit-frame-pointer -malign-functions=2 -malign-loops=2 \
#-malign-jumps=2

# Define where you want Frotz to be installed.  Usually this is /usr/local
PREFIX = /usr/local
#PREFIX =

# Define where you want Frotz to look for frotz.conf.
CONFIG_DIR = /usr/local/etc
#CONFIG_DIR = /etc
#CONFIG_DIR = /usr/pkg/etc
#CONFIG_DIR =

# Uncomment this if you want color support.  Usually this requires ncurses.
#COLOR_DEFS = -DCOLOR_SUPPORT

# Uncomment this if you have an OSS soundcard driver and want classical
# Infocom sound support.
#SOUND_DEFS = -DOSS_SOUND

# This should point to the location of your curses.h or ncurses.h include
# file if your compiler doesn't know about it.
INCL = -I/usr/local/include
#INCL = -I/usr/pkg/include
#INCL = -I/usr/freeware/include
#INCL = -I/5usr/include
#INCL =

# This should define the location and name of whatever curses library you're
# linking with.  Usually, this isn't necessary if /etc/ld.so.conf is set
# up correctly.
LIB = -L/usr/local/lib
#LIB = -L/usr/pkg/lib
#LIB = -L/usr/freeware/lib
#LIB = -L/5usr/lib
#LIB =

# One of these must be uncommented, use ncurses if you have it. 
CURSES = -lncurses	# Linux always uses ncurses.
#CURSES = -lcurses

# Comment this out if you're not using ncurses.
CURSES_DEF = -DUSE_NCURSES_H

# Uncomment this if you're compiling Unix Frotz on a machine that lacks
# the memmove(3) system call.  If you don't know what this means, leave it
# alone.
#MEMMOVE_DEF = -DNO_MEMMOVE

# Uncomment this if for some wacky reason you want to compile Unix Frotz
# under Cygwin under Windoze.  This sort of thing is not reccomended.
#EXTENSION = .exe


#####################################################
# Nothing under this line should need to be changed.
#####################################################

VERSION = 2.40

BINNAME = frotz

DISTNAME = $(BINNAME)-$(VERSION)

OBJECTS = buffer.o err.o fastmem.o files.o hotkey.o input.o main.o \
	math.o object.o process.o quetzal.o random.o redirect.o \
	screen.o sound.o stream.o table.o text.o ux_init.o ux_input.o \
	ux_pic.o ux_screen.o ux_text.o variable.o \
	ux_audio_none.o ux_audio_oss.o

OPT_DEFS = -DCONFIG_DIR="\"$(CONFIG_DIR)\"" $(CURSES_DEF)

COMP_DEFS = $(OPT_DEFS) $(COLOR_DEFS) $(SOUND_DEFS) $(SOUNDCARD) \
	$(MEMMOVE_DEF)

CFLAGS = $(OPTS) $(COMP_DEFS) $(INCL)


$(BINNAME): soundcard.h $(OBJECTS)
	$(CC) -o $(BINNAME)$(EXTENSION) $(OBJECTS) $(LIB) $(CURSES)

soundcard.h:
	@if [ ! -f soundcard.h ] ; then ./findsound.sh; fi

install: $(BINNAME)
	strip $(BINNAME)
	install -c -m 755 $(BINNAME)$(EXTENSION) $(PREFIX)/bin
	install -c -m 644 $(BINNAME).6 $(PREFIX)/man/man6

uninstall:
	rm -f $(PREFIX)/bin/$(BINNAME)$(EXTENSION)
	rm -f $(PREFIX)/man/man6/$(BINNAME).6

deinstall: uninstall

clean:
	rm -f *.o

distro: dist

dist: distclean
	cd .. ; tar cfv $(DISTNAME).tar $(DISTNAME) ; gzip -f $(DISTNAME).tar

distclean: clean
	rm -f soundcard.h
	rm -f $(BINNAME)$(EXTENSION)

realclean: distclean

clobber: distclean

help:
	@echo
	@echo "Targets:"
	@echo "    frotz"
	@echo "    install"
	@echo "    uninstall"
	@echo "    clean"
	@echo "    distclean"
	@echo