]> git.saurik.com Git - wxWidgets.git/blob - utils/Install/sfxzip/makefile.g95
forgotten method declaration
[wxWidgets.git] / utils / Install / sfxzip / makefile.g95
1 # Makefile for UnZip, fUnZip and UnZipSFX for native Win32-Intel ports of gcc.
2 # Currently supported implementations: Cygnus/Win32 and MinGW32.
3 #
4 # First version: Cosmin Truta <cosmint@cs.ubbcluj.ro>, Dec 1997.
5 # Last revision: Christian Spieler, 29-Apr-1998
6 #
7 # To use, do "make -f win32/makefile.gcc".
8
9
10 ### Optional section
11
12 # Optional nonstandard preprocessor flags (as -DUSE_ZLIB or -DUSE_SMITH_CODE)
13 # should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added
14 # to the declaration of LOCFLAGS here:
15 LOCFLAGS = $(LOCAL_UNZIP)
16
17
18 ### Compiler-specific section
19
20 # ------------ GNU C ------------
21 CC = gcc
22
23 #AS = as
24 AS = $(CC)
25
26 #LD = ld
27 LD = $(CC)
28
29 # Quiet
30 CC_QUIET_OPT =
31 AS_QUIET_OPT = $(CC_QUIET_OPT)
32 LD_QUIET_OPT = $(CC_QUIET_OPT)
33
34 # Warnings
35 CC_WARN_OPT = -Wall
36 AS_WARN_OPT = $(CC_WARN_OPT)
37 LD_WARN_OPT =
38
39 # Debug version
40 CC_DEBUG_OPT = -g
41 AS_DEBUG_OPT = $(CC_DEBUG_OPT)
42 LD_DEBUG_OPT = $(CC_DEBUG_OPT)
43
44 # Release version
45 CC_RELEASE_OPT =
46 AS_RELEASE_OPT =
47 #LD_RELEASE_OPT = -s
48
49 # Smallest code
50 CC_SIZE_OPT = -O1
51
52 # Fastest code
53 CC_SPEED_OPT = -O2
54
55 # Output object file name
56 CC_OUT_OPT = -o
57
58 # Other specific options
59 #CC_SPECIFIC_OPT = -c -DASM_CRC -DWIN32 -mno-cygwin
60 CC_SPECIFIC_OPT = -c -DWIN32 -I../inczip -g -I.. -D_X86_=1 -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -I../../../include -I../../../src/png -I../../../src/jpeg -I../../../src/zlib -I../../../include/wx/msw/gnuwin32 -DSTRICT -D__WXMSW__ -D__WINDOWS__ -D__WXDEBUG__ -Wall -fno-pcc-struct-return -O2 -fno-rtti -fno-exceptions
61 AS_SPECIFIC_OPT = -c
62 LD_SPECIFIC_OPT = -Wl,--subsystem,windows -mwindows -L../../../lib -o $@
63
64 # Libraries for the debug & release version
65 LD_RELEASE_LIBS = ../../../lib/libwx.a -lpng -ljpeg -lzlib -lxpm -lstdc++ -lgcc -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lole32 -loleaut32 -luuid -lodbc32 -lwsock32
66 LD_DEBUG_LIBS = $(LD_RELEASE_LIBS)
67
68
69 ### System-specific section
70
71 # Suffixes
72 OBJ = .o
73 EXE = .exe
74
75 .SUFFIXES: .c .S $(OBJ) $(EXE)
76
77 # Commands
78 RM = rm -f
79
80
81 ### General section
82
83 CFLAGS = $(CC_SPECIFIC_OPT) $(CC_QUIET_OPT) $(CC_WARN_OPT) $(LOCFLAGS) \
84 $(CC_OUT_OPT) $@
85 ASFLAGS = $(AS_SPECIFIC_OPT) $(AS_QUIET_OPT) $(AS_WARN_OPT) $(LOCFLAGS)
86 LDFLAGS = $(LD_SPECIFIC_OPT) $(LD_QUIET_OPT) $(LD_WARN_OPT)
87
88 # To build with debug info, use 'make DEBUG=1'.
89 ifdef DEBUG
90 CVER = $(CC_DEBUG_OPT)
91 ASVER = $(AS_DEBUG_OPT)
92 LDVER = $(LD_DEBUG_OPT)
93 GENFLAGS =
94 FFLAGS = -DFUNZIP
95 SFXFLAGS = -DSFX
96 LDLIBS = $(LD_DEBUG_LIBS)
97 else
98 CVER = $(CC_RELEASE_OPT)
99 ASVER = $(AS_RELEASE_OPT)
100 LDVER = $(LD_RELEASE_OPT)
101 GENFLAGS = $(CC_SPEED_OPT)
102 FFLAGS = $(CC_SPEED_OPT) -DFUNZIP
103 SFXFLAGS = $(CC_SIZE_OPT) -DSFX
104 LDLIBS = $(LD_RELEASE_LIBS)
105 endif
106
107 # Object files
108 OBJA = crc_i386$(OBJ) install$(OBJ) wxmain$(OBJ) instsup$(OBJ)
109 OBJS1 = unzip$(OBJ) crc32$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ)
110 OBJS2 = explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) inflate$(OBJ)
111 OBJS3 = list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) unreduce$(OBJ)
112 OBJS4 = unshrink$(OBJ) zipinfo$(OBJ) win32$(OBJ) nt$(OBJ)
113 OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJA)
114
115 UNZIP_H = ../inczip/unzip.h ../inczip/unzpriv.h ../inczip/globals.h ../inczip/w32cfg.h
116
117
118 # Default target is all the executables
119 unzips: sfx$(EXE)
120
121 sfx$(EXE): $(OBJS)
122 $(LD) $(LDFLAGS) $(LDVER) $(OBJS) $(LDLIBS)
123
124 # How to compile sources
125 .c$(OBJ):
126 $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $<
127 .S$(OBJ):
128 $(AS) $(ASFLAGS) $(ASVER) $(GENFLAGS) $<
129
130 # Dependencies
131 crc32$(OBJ): crc32.c $(UNZIP_H) ../inczip/zip.h
132 crctab$(OBJ): crctab.c $(UNZIP_H) ../inczip/zip.h
133 crypt$(OBJ): crypt.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h
134 envargs$(OBJ): envargs.c $(UNZIP_H)
135 explode$(OBJ): explode.c $(UNZIP_H)
136 extract$(OBJ): extract.c $(UNZIP_H) ../inczip/crypt.h
137 fileio$(OBJ): fileio.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/ebcdic.h
138 funzip$(OBJ): funzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/tables.h
139 globals$(OBJ): globals.c $(UNZIP_H)
140 inflate$(OBJ): inflate.c ../inczip/inflate.h $(UNZIP_H)
141 list$(OBJ): list.c $(UNZIP_H)
142 match$(OBJ): match.c $(UNZIP_H)
143 process$(OBJ): process.c $(UNZIP_H)
144 ttyio$(OBJ): ttyio.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h
145 unreduce$(OBJ): unreduce.c $(UNZIP_H)
146 unshrink$(OBJ): unshrink.c $(UNZIP_H)
147 unzip$(OBJ): unzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/version.h ../inczip/consts.h
148 zipinfo$(OBJ): zipinfo.c $(UNZIP_H)
149 crc_i386$(OBJ): crc_i386.S
150 win32$(OBJ): win32.c $(UNZIP_H) ../inczip/nt.h
151 nt$(OBJ): nt.c ../inczip/nt.h
152
153 install$(OBJ): ../install.c
154 $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $<
155
156 wxmain$(OBJ): ../wxmain.cpp
157 $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $<
158
159 instsup$(OBJ): ../instsup.cpp
160 $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $<
161
162 clean:
163 $(RM) *$(OBJ)
164 $(RM) *$(EXE)