]> git.saurik.com Git - wxWidgets.git/blame - utils/Install/packzip/makefile.g95
fix for wxExecute(subprocess which produces a lot of output) bug
[wxWidgets.git] / utils / Install / packzip / makefile.g95
CommitLineData
f6bcfd97
BP
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:
15LOCFLAGS = $(LOCAL_UNZIP)
16
17
18### Compiler-specific section
19
20# ------------ GNU C ------------
21CC = gcc
22
23#AS = as
24AS = $(CC)
25
26#LD = ld
27LD = $(CC)
28
29# Quiet
30CC_QUIET_OPT =
31AS_QUIET_OPT = $(CC_QUIET_OPT)
32LD_QUIET_OPT = $(CC_QUIET_OPT)
33
34# Warnings
35CC_WARN_OPT = -Wall
36AS_WARN_OPT = $(CC_WARN_OPT)
37LD_WARN_OPT =
38
39# Debug version
40CC_DEBUG_OPT = -g
41AS_DEBUG_OPT = $(CC_DEBUG_OPT)
42LD_DEBUG_OPT = $(CC_DEBUG_OPT)
43
44# Release version
45CC_RELEASE_OPT =
46AS_RELEASE_OPT =
47LD_RELEASE_OPT = -s
48
49# Smallest code
50CC_SIZE_OPT = -O1
51
52# Fastest code
53CC_SPEED_OPT = -O2
54
55# Output object file name
56CC_OUT_OPT = -o
57
58# Other specific options
59#CC_SPECIFIC_OPT = -c -DASM_CRC -DWIN32 -mno-cygwin
60CC_SPECIFIC_OPT = -c -DWIN32 -mno-cygwin -I../inczip
61AS_SPECIFIC_OPT = -c
62LD_SPECIFIC_OPT = -mno-cygwin -o $@
63
64# Libraries for the debug & release version
65LD_RELEASE_LIBS = -luser32 -ladvapi32
66LD_DEBUG_LIBS = $(LD_RELEASE_LIBS)
67
68
69### System-specific section
70
71# Suffixes
72OBJ = .o
73EXE = .exe
74
75.SUFFIXES: .c .S $(OBJ) $(EXE)
76
77# Commands
78RM = rm -f
79
80
81### General section
82
83CFLAGS = $(CC_SPECIFIC_OPT) $(CC_QUIET_OPT) $(CC_WARN_OPT) $(LOCFLAGS) \
84 $(CC_OUT_OPT) $@
85ASFLAGS = $(AS_SPECIFIC_OPT) $(AS_QUIET_OPT) $(AS_WARN_OPT) $(LOCFLAGS)
86LDFLAGS = $(LD_SPECIFIC_OPT) $(LD_QUIET_OPT) $(LD_WARN_OPT)
87
88# To build with debug info, use 'make DEBUG=1'.
89ifdef DEBUG
90CVER = $(CC_DEBUG_OPT)
91ASVER = $(AS_DEBUG_OPT)
92LDVER = $(LD_DEBUG_OPT)
93GENFLAGS =
94FFLAGS = -DFUNZIP
95SFXFLAGS = -DSFX
96LDLIBS = $(LD_DEBUG_LIBS)
97else
98CVER = $(CC_RELEASE_OPT)
99ASVER = $(AS_RELEASE_OPT)
100LDVER = $(LD_RELEASE_OPT)
101GENFLAGS = $(CC_SPEED_OPT)
102FFLAGS = $(CC_SPEED_OPT) -DFUNZIP
103SFXFLAGS = $(CC_SIZE_OPT) -DSFX
104LDLIBS = $(LD_RELEASE_LIBS)
105endif
106
107# Object files
108OBJA = crc_i386$(OBJ) packinst$(OBJ)
109OBJS1 = unzip$(OBJ) crc32$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ)
110OBJS2 = explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) inflate$(OBJ)
111OBJS3 = list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) unreduce$(OBJ)
112OBJS4 = unshrink$(OBJ) zipinfo$(OBJ) win32$(OBJ) nt$(OBJ)
113OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJA)
114
115UNZIP_H = ../inczip/unzip.h ../inczip/unzpriv.h ../inczip/globals.h ../inczip/w32cfg.h
116
117
118# Default target is all the executables
119unzips: packinst$(EXE)
120
121packinst$(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
131crc32$(OBJ): crc32.c $(UNZIP_H) ../inczip/zip.h
132crctab$(OBJ): crctab.c $(UNZIP_H) ../inczip/zip.h
133crypt$(OBJ): crypt.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h
134envargs$(OBJ): envargs.c $(UNZIP_H)
135explode$(OBJ): explode.c $(UNZIP_H)
136extract$(OBJ): extract.c $(UNZIP_H) ../inczip/crypt.h
137fileio$(OBJ): fileio.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/ebcdic.h
138funzip$(OBJ): funzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/tables.h
139globals$(OBJ): globals.c $(UNZIP_H)
140inflate$(OBJ): inflate.c ../inczip/inflate.h $(UNZIP_H)
141list$(OBJ): list.c $(UNZIP_H)
142match$(OBJ): match.c $(UNZIP_H)
143process$(OBJ): process.c $(UNZIP_H)
144ttyio$(OBJ): ttyio.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h
145unreduce$(OBJ): unreduce.c $(UNZIP_H)
146unshrink$(OBJ): unshrink.c $(UNZIP_H)
147unzip$(OBJ): unzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/version.h ../inczip/consts.h
148zipinfo$(OBJ): zipinfo.c $(UNZIP_H)
149crc_i386$(OBJ): crc_i386.S
150win32$(OBJ): win32.c $(UNZIP_H) ../inczip/nt.h
151nt$(OBJ): nt.c ../inczip/nt.h
152
153packinst$(OBJ): ../packinst/packinst.c
154 $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $<
155
156clean:
157 $(RM) *$(OBJ)
158 $(RM) *$(EXE)