]> git.saurik.com Git - wxWidgets.git/blame - utils/Install/sfxzip/makefile
nicer version compilation fix for wxUSE_WCHAR_T=0 (why should we duplicate definition...
[wxWidgets.git] / utils / Install / sfxzip / makefile
CommitLineData
f6bcfd97
BP
1#==============================================================================
2# Makefile for UnZip, UnZipSFX and fUnZip: Unix and MS-DOS ("real" makes only)
3# Version: 5.4 19 November 1998
4#==============================================================================
5
6
7# INSTRUCTIONS (such as they are):
8#
9# "make sunos" -- makes UnZip in current directory on a generic SunOS 4.x Sun
10# "make list" -- lists all supported systems (targets)
11# "make help" -- provides pointers on what targets to try if problems occur
12# "make wombat" -- chokes and dies if you haven't added the specifics for your
13# Wombat 68000 (or whatever) to the systems list
14#
15# CF are flags for the C compiler. LF are flags for the loader. LF2 are more
16# flags for the loader, if they need to be at the end of the line instead of at
17# the beginning (for example, some libraries). FL and FL2 are the corre-
18# sponding flags for fUnZip. LOCAL_UNZIP is an environment variable that can
19# be used to add default C flags to your compile without editing the Makefile
20# (e.g., -DDEBUG_STRUC, or -FPi87 on PCs using Microsoft C).
21#
22# Some versions of make do not define the macro "$(MAKE)"; this is rare, but
23# if things don't work, try using "make" instead of "$(MAKE)" in your system's
24# makerule. Or try adding the following line to your .login file:
25# setenv MAKE "make"
26# (That never works--makes that are too stupid to define MAKE are also too
27# stupid to look in the environment--but try it anyway for kicks. :-) )
28#
29# Memcpy and memset are provided for those systems that don't have them; they
30# are in fileio.c and will be used if -DZMEM is included in CF. These days
31# almost all systems have them.
32#
33# Be sure to test your new UnZip (and UnZipSFX and fUnZip); successful compila-
34# tion does not always imply a working program.
35
36
37#####################
38# MACRO DEFINITIONS #
39#####################
40
41# Defaults most systems use (use LOCAL_UNZIP in environment to add flags,
42# such as -DDOSWILD).
43
44# UnZip flags
45CC = cc# try using "gcc" target rather than changing this (CC and LD
46LD = $(CC)# must match, else "unresolved symbol: ___main" is possible)
47AS = as
48LOC = $(LOCAL_UNZIP)
49AF = $(LOC)
50CF = -O -g -I. -I.. -I../inczip $(LOC) -I/usr/local//include -I/usr/X11R6/include -I/usr/local/lib/glib/include -DSTRICT -D__WXGTK__ -DGTK_NO_CHECK_CASTS -D_REENTRANT -D_IODBC_ -Wall
51LF = -o sfx -L/usr/local/lib -L/usr/X11R6/lib -L/usr -lwx_gtk -lpng -ljpeg -lstdc++ -lgcc -lc_r -lgtk -lgdk -lgmodule -lglib -lXext -lX11 -lm -lgthread
52LF2 = -s
53
54# general-purpose stuff
55#CP = cp
56CP = ln
57LN = ln
58RM = rm -f
59CHMOD = chmod
60BINPERMS = 755
61MANPERMS = 644
62STRIP = strip
63E =
64O = .o
65M = unix
66SHELL = /bin/sh
67
68# defaults for crc32 stuff and system dependent headers
69CRC32 = crc32
70
71# object files
72OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O
73OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O
74OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O
75OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O install$O wxmain$O instsup$O
76UNZIP_H = ../inczip/unzip.h ../inczip/unzpriv.h ../inczip/globals.h
77
78# installation
79# (probably can change next two to `install' and `install -d' if you have it)
80INSTALL = cp
81INSTALL_D = mkdir -p
82
83###############################################
84# BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES #
85###############################################
86
87# this is for GNU make; comment out and notify zip-bugs if it causes errors
88.SUFFIXES: .c .o .obj .pic.o
89
90# yes, we should be able to use the $O macro to combine these two, but it
91# fails on some brain-damaged makes (e.g., AIX's)...no big deal
92.c.o:
93 $(CC) -c $(CF) $*.c
94
95.c.obj:
96 $(CC) -c $(CF) $*.c
97
98.c.pic.o:
99 $(CC) -c $(CF) -o $@ $*.c
100
101all: sfx
102
103
104# EDIT HERE FOR PARALLEL MAKES on Sequent (and others?)--screws up MS-DOS
105# make utilities if default: change "unzip$E:" to "unzip$E:&"
106
107sfx$E: $(OBJS) # add `&' for parallel makes
108 $(LD) $(LF) $(OBJS)
109
110crc32$O: crc32.c $(UNZIP_H) ../inczip/zip.h
111crctab$O: crctab.c $(UNZIP_H) ../inczip/zip.h
112crypt$O: crypt.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h
113envargs$O: envargs.c $(UNZIP_H)
114explode$O: explode.c $(UNZIP_H)
115extract$O: extract.c $(UNZIP_H) ../inczip/crypt.h
116fileio$O: fileio.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/ebcdic.h
117funzip$O: funzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/tables.h
118globals$O: globals.c $(UNZIP_H)
119inflate$O: inflate.c ../inczip/inflate.h $(UNZIP_H)
120list$O: list.c $(UNZIP_H)
121match$O: match.c $(UNZIP_H)
122process$O: process.c $(UNZIP_H)
123ttyio$O: ttyio.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h
124unreduce$O: unreduce.c $(UNZIP_H)
125unshrink$O: unshrink.c $(UNZIP_H)
126unzip$O: unzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/version.h ../inczip/consts.h
127zipinfo$O: zipinfo.c $(UNZIP_H)
128
129unix$O: unix.c $(UNZIP_H) ../inczip/version.h # Unix only
130 $(CC) -c $(CF) unix.c
131
132install$O: ../install.c
133 $(CC) -c $(CF) ../install.c
134
135wxmain$O: ../wxmain.cpp
136 $(CC) -c $(CF) ../wxmain.cpp
137
138instsup$O: ../instsup.cpp
139 $(CC) -c $(CF) ../instsup.cpp
140
141
142