File: Makefile

package info (click to toggle)
jzip 202b19981014-3.1
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 404 kB
  • ctags: 799
  • sloc: ansic: 6,312; makefile: 70; sh: 27
file content (84 lines) | stat: -rw-r--r-- 3,296 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
# UNIX C makefile for the JZIP Infocom interpreter
#
# If you have:            |  CC=  |  CFLAGS =       |  LIBS =     |
#-------------------------+-------+-----------------+-------------+
#    Linux                |  gcc  |  -c -DPOSIX     |  -ltermcap  | 
#                         |       |  -DHAVE_GETOPT  |             |
#    FreeBSD              |  cc   |  -c -DPOSIX     |  -ltermcap  | 
#                         |       |  -DHAVE_GETOPT  |             |
#    RS6000 / AIX         |  xlc  |  -c -DAIX       |  -ltermcap  |
#    SGI / Irix 4.x       |  cc   |  -c -DPOSIX     |  -lcurses   |
#    SGI / Irix 5.x       |  cc   |  -c -DPOSIX     |  -lcurses   |
#                         |       |  -DHAVE_GETOPT  |             |
#    SPARC / SunOS        |  cc   |  -c -DPOSIX     |  -ltermcap  |
#    SPARC /Solaris       |  gcc  |  -c -DPOSIX     |  -ltermcap  |
#                         |       |  -DNO_BCOPY     |             |
#                         |       |  -DHAVE_GETOPT  |             |
#    NeXT / Mach          |  cc   |  -c -DBSD       |  -ltermcap  |    
#    BSDI                 |  cc   |  -c -DBSD       |  -ltermcap  |    
#                         |       |  -DHAVE_GETOPT  |             |
#    Alpha / OSF/1        |  cc   |  -c -DPOSIX     |  -lcurses   |
#    HP9000 / HP-UX       |  gcc  |  -c -DPOSIX     |  -ltermcap  |
#    HP9000 / HP-UX >10.x |  cc   |  -c -DPOSIX     |  -ltermcap  |
#    DEC / Ultrix         |  cc   |  -c -DPOSIX     |  -lcurses   | (not tested)
#
# To try and use ANSI color escape sequences, try adding
# -DHARD_COLORS
# to the CFLAGS line.
#
# To disable Quetzal and use the old Jzip save format, 
# edit ztypes.h and comment out:                      #define USE_QUETZAL
#
# To disable strict zcode checking so the interpreter
# _cannot_ be strict, edit ztypes.h and comment out:  #define STRICTZ

CC = cc

# If your compiler doesn't like this, put -O or nothing.
OPTIMIZE = -O2 -Wall
# If you feel like changing code and wanna debug, use this one:
#OPTIMIZE = -g  -ansi -pedantic
#OPTIMIZE =

CFLAGS = $(OPTIMIZE) -DPOSIX -DHAVE_GETOPT -DHARD_COLORS

LIBS = -lncurses
#LIBS = -ltermcap

# -------------------------------------------------------------------
# YOU SHOULD NOT NEED TO MODIFY BELOW HERE
# -------------------------------------------------------------------

INC = ztypes.h jzip.h

OBJS = jzip.o control.o extern.o fileio.o input.o interpre.o math.o memory.o \
	object.o operand.o osdepend.o property.o quetzal.o screen.o text.o \
	variable.o unixio.o


all  : jzip jzexe ckifzs


jzip : $(OBJS) ztypes.h jzip.h
	$(CC) -o $@ $(CFLAGS) $(OBJS) $(LIBS)

jzexe : jzexe.o jzexe.h
	$(CC) -o $@ $(CFLAGS) jzexe.o

ckifzs : ckifzs.o
	$(CC) -o $@ $(CFLAGS) ckifzs.o

install :
	install -D -o root -g root -m 0755 jzip ${DESTDIR}/usr/games/jzip
	install -D -o root -g root -m 0755 jzexe ${DESTDIR}/usr/games/jzexe
	install -D -o root -g root -m 0755 ckifzs ${DESTDIR}/usr/games/ckifzs
clean :
	-rm -f *.o jzip jzexe ckifzs

DATE = `date +%m%d%Y`
FULLDATE = `date '+%a, %b %d %Y'`
archive:
	-echo "#define JZIPVER \"JZIP V2.0.2 beta\"" > ./jzip.h
	-echo "#define JZIPRELDATE \"$(FULLDATE)\"" >> ./jzip.h
	-tar cvf jzip202-std10-$(DATE).tar *.[c,h] *.txt *.6 *.mak Makefile > /dev/null 2>&1
	-gzip --force jzip202-std10-$(DATE).tar