File: makefile.azt

package info (click to toggle)
unzip 5.40-1
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 4,120 kB
  • ctags: 5,900
  • sloc: ansic: 40,977; cpp: 3,778; makefile: 1,384; asm: 1,228; sh: 133
file content (128 lines) | stat: -rw-r--r-- 3,685 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
# Makefile for UnZip 5.4 using Manx Aztec C 5.2, last revised 18 Nov 98.
# Define EXTRA=xxx on the Make command line for e.g. -dUSE_UNSHRINK.

EXTRA =

CC = cc
VERNUMS = -d __VERSION__=5 -d __REVISION__=2
CFLAGS = -ps -sabfmnpu -wcpr0u -d AMIGA $(EXTRA)
# -ps means short ints, -sabfmnpu is optimizations, -wcpr0u is type checking
# option flags MORE and ASM_* are now set in the Aztec section of amiga/amiga.h;
# it's cleaner, and that way any changes forces a recompile.

LD = ln
LDFLAGS = +q -m
LDLIBS = -lc16
# linker arg -m suppresses warnings about overriding c.lib functions

OBJS = unzip.o process.o crypt.o ttyio.o envargs.o explode.o \
         unshrink.o extract.o zipinfo.o inflate.o match.o unreduce.o \
         fileio.o list.o globals.o crctab.o amiga/amiga.o amiga/crc_68.o \
         amiga/flate.o amiga/time_lib.o

XOBJS = unzip.xo process.xo crypt.o ttyio.o extract.xo fileio.o \
         inflate.o match.o globals.o crctab.o amiga/flate.o amiga/amiga.xo \
         amiga/crc_68.o amiga/time_lib.o

FOBJS = funzip.o crypt.fo ttyio.fo inflate.fo globals.fo \
         amiga/flate.fo amiga/crc_68.o amiga/filedate.fo


.c.o :
	$(CC) -o $@ $(CFLAGS) $*.c

.c.xo:
	$(CC) -o $@ -d SFX $(CFLAGS) $*.c

.c.fo:
	$(CC) -o $@ -d FUNZIP $(CFLAGS) $*.c

all : UnZip UnZipSFX fUnZip MakeSFX

u : UnZip

f : fUnZip

x : UnZipSFX

m : MakeSFX

UnZip :     $(OBJS)
	$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)

UnZipSFX :  $(XOBJS) MakeSFX
	$(LD) $(LDFLAGS) -o $@ $(XOBJS) $(LDLIBS)

fUnZip :    $(FOBJS)
	$(LD) $(LDFLAGS) -o $@ $(FOBJS) $(LDLIBS)

MakeSFX :   amiga/makesfx.c
	$(CC) $(CFLAGS) -o t:makesfx.o amiga/makesfx.c
	$(LD) $(LDFLAGS) -o MakeSFX t:makesfx.o $(LDLIBS)
	-@delete t:makesfx.o

clean :
	-delete $(OBJS)
	-delete $(XOBJS)
	-delete $(FOBJS)
	-delete amiga/G_offs.a amiga/G_offs.fa amiga/mkGoff amiga/FmkGoff

cleaner : clean
	-delete UnZip fUnZip UnZipSFX MakeSFX


$(OBJS) $(XOBJS) $(FOBJS) : unzip.h unzpriv.h globals.h \
                             amiga/amiga.h amiga/z-stat.h amiga/z-time.h

crypt.o crypt.fo ttyio.o ttyio.fo : zip.h

inflate.o inflate.fo : inflate.h

fileio.o : ebcdic.h
funzip.o : tables.h

crypt.o crypt.fo ttyio.o ttyio.fo unzip.o unzip.xo funzip.o : crypt.h
fileio.o extract.o extract.xo inflate.o inflate.fo amiga/filedate.fo : crypt.h
amiga/mkGoff amiga/FmkGoff : crypt.h

crypt.o crypt.fo ttyio.o ttyio.fo funzip.o fileio.o : ttyio.h

unzip.o unzip.xo : version.h consts.h


# Special case object files:

amiga/amiga.o : amiga/filedate.c amiga/stat.c amiga/amiga.c
	rx > env:VersionDate "say '""'translate(date('E'), '.', '/')'""'"
	$(CC) -o amiga/amiga.o $(CFLAGS) $(VERNUMS) amiga/amiga.c

amiga/amiga.xo : amiga/filedate.c amiga/stat.c amiga/amiga.c
	$(CC) -o amiga/amiga.xo $(CFLAGS) $(VERNUMS) -d SFX amiga/amiga.c

amiga/crc_68.o : amiga/crc_68.a
	as -n -o amiga/crc_68.o amiga/crc_68.a

amiga/flate.o : amiga/flate.a amiga/G_offs.a
	as -n -o amiga/flate.o -eINT16 amiga/flate.a

amiga/flate.fo : amiga/flate.a amiga/G_offs.fa
	as -n -o amiga/flate.fo -eINT16 -eFUNZIP -eAZTEC amiga/flate.a

# These special files are generated on the fly by a program we compile and
# then run, and then included into amiga/flate.a to provide definitions for it:

amiga/G_offs.a : amiga/mkGoff
	amiga/mkGoff > amiga/G_offs.a

amiga/G_offs.fa : amiga/FmkGoff
	amiga/FmkGoff > amiga/G_offs.fa

amiga/mkGoff : amiga/mkGoff.c globals.h crypt.h
	$(CC) -o t:mkgoff.o $(CFLAGS) amiga/mkGoff.c
	$(LD) $(LDFLAGS) -o amiga/mkGoff t:mkgoff.o $(LDLIBS)
	-@delete t:mkgoff.o

amiga/FmkGoff : amiga/mkGoff.c globals.h crypt.h
	$(CC) -o t:mkgoff.o $(CFLAGS) -d FUNZIP amiga/mkGoff.c
	$(LD) $(LDFLAGS) -o amiga/FmkGoff t:mkgoff.o $(LDLIBS)
	-@delete t:mkgoff.o