Debian Codegraph @

theos/Makefile

raw
1 # Makefile for Zip, ZipCloak, ZipNote and ZipSplit for
2 # THEOS ANSI C
3 # To use, do "make -f theos/makefile"
4 # This make file uses cl, a C compiler and linker driver written by
5 # Jean-Michel Dubois. Send a mail to [email protected] to get it for free.
6 # MAINWA_BUG Workaround argument expansion failure
7 # LOCATE_BUG Workaround stat, fopen and open failure on relative paths to
8 # root dir.
9
10 CC=cl
11 CFLAGS=-Zi -W3 -DDYN_ALLOC -DCRYPT -DMAINWA_BUG -DLOCATE_BUG
12 LD=cl -o
13 LDFLAGS=-m -Zi
14 AS=cc
15 ASFLAGS=
16
17 UTILFLAGS=-DUTIL $(CFLAGS) -Fo
18
19 # variables
20
21 # object file lists
22 OBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o crypt.o ttyio.o \
23 theos.o crc32.o _fprintf.o _stat.o _chmod.o _isatty.o \
24 _setargv.o _rename.o
25 OBJI = deflate.o trees.o
26 OBJA =
27 OBJU = zipfile_.o fileio_.o util_.o globals.o theos_.o _rename.o _stat.o \
28 _chmod.o _fprintf.o
29 OBJN = zipnote.o $(OBJU)
30 OBJC = zipcloak.o $(OBJU) crc32_.o crypt_.o ttyio.o
31 OBJS = zipsplit.o $(OBJU)
32
33 OSDEP_H = theos/osdep.h
34 ZIP_H = zip.h ziperr.h tailor.h $(OSDEP_H)
35
36 ZIPS = zip.command zipnote.command zipsplit.command zipcloak.command
37
38 zips: $(ZIPS)
39
40 zip.o: zip.c $(ZIP_H) crc32.h crypt.h ttyio.h revision.h
41 $(CC) -c $(CFLAGS) $*.c
42
43 zipfile.o: zipfile.c $(ZIP_H) crc32.h
44 $(CC) -c $(CFLAGS) $*.c
45
46 zipup.o: zipup.c $(ZIP_H) revision.h crc32.h crypt.h
47 $(CC) -c $(CFLAGS) $*.c
48
49 fileio.o: fileio.c $(ZIP_H) crc32.h
50 $(CC) -c $(CFLAGS) $*.c
51
52 util.o: util.c $(ZIP_H) theos/charconv.h
53 $(CC) -c $(CFLAGS) $*.c
54
55 globals.o: globals.c $(ZIP_H)
56 $(CC) -c $(CFLAGS) $*.c
57
58 crc32.o: crc32.c $(ZIP_H) crc32.h
59 $(CC) -c $(CFLAGS) $*.c
60
61 deflate.o: deflate.c $(ZIP_H)
62 $(CC) -c $(CFLAGS) $*.c
63
64 trees.o: trees.c $(ZIP_H)
65 $(CC) -c $(CFLAGS) $*.c
66
67 crypt.o: crypt.c $(ZIP_H) crc32.h crypt.h
68 $(CC) -c $(CFLAGS) $*.c
69
70 theos.o: theos/theos.c $(ZIP_H)
71 $(CC) -c $(CFLAGS) -Fo$@ theos/theos.c
72
73 _fprintf.o: theos/_fprintf.c
74 $(CC) -c $(CFLAGS) -Fo$@ theos/_fprintf.c
75
76 _stat.o: theos/_stat.c
77 $(CC) -c $(CFLAGS) -Fo$@ theos/_stat.c
78
79 _chmod.o: theos/_chmod.c
80 $(CC) -c $(CFLAGS) -Fo$@ theos/_chmod.c
81
82 _isatty.o: theos/_isatty.c
83 $(CC) -c $(CFLAGS) -Fo$@ theos/_isatty.c
84
85 _rename.o: theos/_rename.c
86 $(CC) -c $(CFLAGS) -Fo$@ theos/_rename.c
87
88 _setargv.o: theos/_setargv.c
89 $(CC) -c $(CFLAGS) -Fo$@ theos/_setargv.c
90
91 ttyio.o: $(ZIP_H) ttyio.h ttyio.c
92 $(CC) -c $(CFLAGS) $*.c
93
94 zipcloak.o: zipcloak.c $(ZIP_H) crc32.h crypt.h ttyio.h revision.h
95 $(CC) -c $(CFLAGS) $*.c
96
97 zipnote.o: zipnote.c $(ZIP_H) revision.h
98 $(CC) -c $(CFLAGS) $*.c
99
100 zipsplit.o: $(ZIP_H) revision.h
101 $(CC) -c $(CFLAGS) $*.c
102
103 zipfile_.o: zipfile.c $(ZIP_H) crc32.h
104 $(CC) -c $(UTILFLAGS)$@ zipfile.c
105
106 fileio_.o: fileio.c $(ZIP_H) crc32.h
107 $(CC) -c $(UTILFLAGS)$@ fileio.c
108
109 theos_.o: theos/theos.c $(ZIP_H)
110 $(CC) -c $(UTILFLAGS)$@ theos/theos.c
111
112 util_.o: util.c $(ZIP_H)
113 $(CC) -c $(UTILFLAGS)$@ util.c
114
115 crc32_.o: crc32.c $(ZIP_H) crc32.h
116 $(CC) -c $(UTILFLAGS)$@ $*.c
117
118 crypt_.o: crypt.c $(ZIP_H) crc32.h crypt.h
119 $(CC) -c $(UTILFLAGS)$@ crypt.c
120
121 zip.command: $(OBJZ) $(OBJI)
122 $(LD) $@ $(OBJZ) $(OBJI) $(LDFLAGS)
123
124 zipcloak.command: $(OBJC)
125 $(LD) $@ $(OBJC) $(LDFLAGS)
126
127 zipnote.command: $(OBJN)
128 $(LD) $@ $(OBJN) $(LDFLAGS)
129
130 zipsplit.command: $(OBJS)
131 $(LD) $@ $(OBJS) $(LDFLAGS)
132
133 install: $(ZIPS)
134 copy *.command /system.cmd32.=(rep noq not
135
136 clean:
137 erase *.o(noq not
138 erase *.command(noq not