Debian Codegraph @

msdos/makefile.dj2

raw
1 # Makefile for Zip, ZipCloak, ZipNote and ZipSplit for
2 # djgpp 2.x
3 VPATH=.;msdos
4 # ------------- djgpp -------------
5 CPPFLAGS=-I. -DDOS -DASM_CRC $(LOCAL_ZIP)
6 ASFLAGS=$(CPPFLAGS)
7 CFLAGS=-Wall -O2 $(CPPFLAGS)
8 UTILFLAGS=-c -DUTIL $(CFLAGS) -o
9 CC=gcc
10 LD=gcc
11 LDFLAGS=-s
12
13 # ------------- file packer --------
14 # Laszlo Molnar who wrote DJ Packer and Markus F. X. J. Oberhumer who wrote
15 # the compression library used by the DJ Packer have collaborated on the
16 # Ultimate Packer for eXecutables, which has recently been released. Look
17 # for upx???d.zip at http://upx.sourceforge.net
18 # As an alternative, look for "djp.exe", now two years old, in the archive
19 # mlp107[b,s].zip, found in the same location as csdpmi?[b,s].zip (see below).
20 # If you have got an executable packer in your PATH, you may reduce the
21 # size of the disk image of the zip*.exe's by uncommenting the lines
22 # containing $(DJP) below where the exe's are built.
23 #DJP=djp -q
24 DJP=upx -qq --best
25
26 # variables
27
28 #set CRC32 to crc_gcc.o or nothing, depending on whether ASM_CRC is defined:
29 CRCA_O = crc_gcc.o
30
31 OBJZ = zip.o crypt.o ttyio.o zipfile.o zipup.o fileio.o util.o \
32 crc32.o $(CRCA_O) globals.o
33 OBJI = deflate.o trees.o match.o msdos.o
34 OBJU = zipfile_.o fileio_.o util_.o globals.o msdos_.o
35 OBJN = zipnote.o $(OBJU)
36 OBJC = zipcloak.o crc32_.o crypt_.o ttyio.o $(OBJU)
37 OBJS = zipsplit.o $(OBJU)
38
39 ZIP_H = zip.h ziperr.h tailor.h msdos/osdep.h
40
41 # rules
42
43 .SUFFIXES: # Delete make's default suffix list
44 .SUFFIXES: .exe .out .a .ln .o .c .cc .C .p .f .F .y .l .s .S .h
45
46 .c.o:
47 $(CC) -c $(CFLAGS) $< -o $@
48
49 zips: zip.exe zipnote.exe zipsplit.exe zipcloak.exe
50
51 zip.o: zip.c $(ZIP_H) revision.h crc32.h crypt.h ttyio.h
52
53 zipfile.o: zipfile.c $(ZIP_H) crc32.h
54
55 zipup.o: zipup.c $(ZIP_H) revision.h crc32.h crypt.h msdos/zipup.h
56
57 fileio.o: fileio.c $(ZIP_H) crc32.h
58
59 util.o: util.c $(ZIP_H)
60
61 globals.o: globals.c $(ZIP_H)
62
63 deflate.o: deflate.c $(ZIP_H)
64
65 trees.o: trees.c $(ZIP_H)
66
67 crc_gcc.o: crc_i386.S
68 $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S
69
70 crc32.o: crc32.c $(ZIP_H) crc32.h
71
72 crypt.o: crypt.c $(ZIP_H) crypt.h crc32.h ttyio.h
73
74 ttyio.o: ttyio.c $(ZIP_H) crypt.h ttyio.h
75
76 msdos.o: msdos/msdos.c $(ZIP_H)
77
78 zipcloak.o: zipcloak.c $(ZIP_H) revision.h crc32.h crypt.h ttyio.h
79
80 zipnote.o: zipnote.c $(ZIP_H) revision.h
81
82 zipsplit.o: zipsplit.c $(ZIP_H) revision.h
83
84 zipfile_.o: zipfile.c $(ZIP_H) crc32.h
85 $(CC) $(UTILFLAGS) $@ zipfile.c
86
87 fileio_.o: fileio.c $(ZIP_H) crc32.h
88 $(CC) $(UTILFLAGS) $@ fileio.c
89
90 util_.o: util.c $(ZIP_H)
91 $(CC) $(UTILFLAGS) $@ util.c
92
93 crc32_.o: crc32.c $(ZIP_H) crc32.h
94 $(CC) $(UTILFLAGS) $@ crc32.c
95
96 crypt_.o: crypt.c $(ZIP_H) crypt.h crc32.h ttyio.h
97 $(CC) $(UTILFLAGS) $@ crypt.c
98
99 msdos_.o: msdos/msdos.c $(ZIP_H)
100 $(CC) $(UTILFLAGS) $@ msdos/msdos.c
101
102
103 match.o: match.S
104 $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ match.S
105
106 zip.exe: $(OBJZ) $(OBJI)
107 echo $(OBJZ) > zip.rsp
108 echo $(OBJI) >> zip.rsp
109 $(LD) $(LDFLAGS) -o $@ @zip.rsp
110 del zip.rsp
111 # stubedit $@ dpmi=cwsdpmi.exe
112 # $(DJP) $@
113
114 zipcloak.exe: $(OBJC)
115 $(LD) $(LDFLAGS) $(OBJC) -o $@
116 # stubedit $@ dpmi=cwsdpmi.exe
117 # $(DJP) $@
118
119 zipnote.exe: $(OBJN)
120 $(LD) $(LDFLAGS) $(OBJN) -o $@
121 # stubedit $@ dpmi=cwsdpmi.exe
122 # $(DJP) $@
123
124 zipsplit.exe: $(OBJS)
125 $(LD) $(LDFLAGS) $(OBJS) -o $@
126 # stubedit $@ dpmi=cwsdpmi.exe
127 # $(DJP) $@
128
129 # These stand alone executables require dpmi services to run. When
130 # running in a DOS window under windows 3.1 or later, the dpmi server
131 # is automatically present. Under DOS, if a dpmi server is not installed,
132 # by default the program will look for "cwsdpmi.exe." If found, it will
133 # be loaded for the duration of the program.
134 # cwsdpmi is a "free" dpmi server written by Charles W. Sandmann
135 # ([email protected]). It may be found, among other sites, on SimTel
136 # and its mirrors in the .../vendors/djgpp/v2misc directory.