home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
HPACK78S.ZIP
/
makefile.os2
< prev
next >
Wrap
Makefile
|
1992-12-02
|
10KB
|
261 lines
#****************************************************************************
#* *
#* Makefile for the OS/2 version of the HPACK archiver *
#* *
#****************************************************************************
# The OS and OS mutation we are compiling under. Currently handled (but
# not necessarily by this makefile) types are __AMIGA__, __ATARI__, __MAC__,
# __MSDOS__, __OS2__(TOPSPEED, 32BIT), __UNIX__ (AIX, AIX370, AIX386, GENERIC,
# IRIX, ISC, LINUX, POSIX, SUNOS, SVR4, ULTRIX, ULTRIX_OLD). Partially
# handled types are __ATARI__, __IIGS__, __VMS__.
OS = -D__OS2__
# The various system-dependant defines from above:
DEFINES = $(OS)
# 32bit: Use gcc
# gcc 2.2.2 - Max Nilson, Max_Nilson@kcbbs.gen.nz
# emx - John Burnell, johnb@maths.grace.cri.nz
# microsoft: Microsoft C (not fully tested)
# Microsoft C 7.0 - Chris Sullivan
# topspeed: TopSpeed C (NB should use the TopSpeed better-make, not this makefile)
# TopSpeed C - John Burnell, johnb@maths.grace.cri.nz
# watcom: Watcom C (not fully tested)
# zortech: Zortech C
# Zortech C - Chris Sullivan
PROJ = hpack
CFLAGS = -c $(DEFINES) -O $(DEBUG) -I. $(CMDC) # Flags for compiler
LFLAGS = -o $(PROJ) $(DEBUG) $(CMDL) # Flags for linker
OUTPATH = # Where object files go (/tmp is a good place)
OBJ = .o # Extension for object files
EXE = .exe # Extension for executables
LD = $(CC) # Linker (just use the C compiler)
LS = dir # Directory command
ECHO = echo # Echo to screen command
MAKE = dmake # The make command
EMXBINDIR = d:\emx\bin # Where EMX stuff lives
#****************************************************************************
#* *
#* If no args are given, print a usage message and exit *
#* *
#****************************************************************************
default:
@$(ECHO) off
@$(ECHO) .
@$(ECHO) You have to enter the OS/2 compiler you want to build HPACK with.
@$(ECHO) Possible options are: 32bit, microsoft, topspeed, watcom, and zortech.
@$(ECHO) If you want to use another compiler, edit the makefile to accomodate it
@$(ECHO) and send a copy of any changes necessary to the author.
love:
@$(ECHO) off
@$(ECHO) Nicht wahr?
@$(ECHO) .
#****************************************************************************
#* *
#* Rules to build HPACK *
#* *
#****************************************************************************
$(OUTPATH)arcdir$(OBJ): arcdir.h defs.h error.h flags.h hpacklib.h \
system.h tags.h io/fastio.h arcdir.c
$(CC) $(CFLAGS) arcdir.c
$(OUTPATH)arcdirio$(OBJ): arcdir.h filehdr.h choice.h defs.h error.h \
hpacklib.h flags.h system.h crc/crc16.h \
crypt/crypt.h io/fastio.h io/hpackio.h \
store/store.h arcdirio.c
$(CC) $(CFLAGS) -DARCHIVE_TYPE=3 arcdirio.c
$(OUTPATH)archive$(OBJ): arcdir.h filehdr.h choice.h defs.h error.h \
filesys.h flags.h frontend.h hpacklib.h system.h \
tags.h crypt/crypt.h io/fastio.h io/hpackio.h \
store/store.h archive.c
$(CC) $(CFLAGS) archive.c
$(OUTPATH)cli$(OBJ): arcdir.h choice.h defs.h error.h filesys.h \
flags.h frontend.h hpacklib.h language/hpaktext.h \
system.h wildcard.h crypt/crypt.h io/fastio.h \
cli.c
$(CC) $(CFLAGS) cli.c
$(OUTPATH)error$(OBJ): arcdir.h defs.h filehdr.h error.h errorlvl.h \
flags.h frontend.h hpacklib.h system.h \
crypt/crypt.h io/fastio.h io/hpackio.h \
store/store.h error.c
$(CC) $(CFLAGS) error.c
$(OUTPATH)filesys$(OBJ): arcdir.h defs.h filehdr.h error.h flags.h \
frontend.h hpacklib.h system.h tags.h io/fastio.h \
io/hpackio.h filesys.c
$(CC) $(CFLAGS) filesys.c
$(OUTPATH)frontend$(OBJ): arcdir.h filehdr.h choice.h defs.h error.h \
filesys.h flags.h frontend.h hpacklib.h system.h \
tags.h wildcard.h crypt/crypt.h io/fastio.h \
io/hpackio.h store/store.h frontend.c
$(CC) $(CFLAGS) frontend.c
$(OUTPATH)script$(OBJ): arcdir.h choice.h defs.h error.h filesys.h \
flags.h frontend.h hpacklib.h \
language/hpaktext.h system.h wildcard.h \
io/fastio.h io/hpackio.h
$(CC) $(CFLAGS) script.c
$(OUTPATH)tags$(OBJ): defs.h error.h hpacklib.h system.h tags.h \
io/fastio.h tags.c
$(CC) $(CFLAGS) tags.c
$(OUTPATH)os2$(OBJ): defs.h arcdir.h frontend.h system.h wildcard.h \
hpacklib.h crc/crc16.h io/fastio.h os2.c
$(CC) $(CFLAGS) os2.c
$(OUTPATH)viewfile$(OBJ): arcdir.h choice.h defs.h error.h filehdr.h \
flags.h frontend.h hpacklib.h \
language/hpaktext.h system.h tags.h wildcard.h \
io/fastio.h io/hpackio.h viewfile.c
$(CC) $(CFLAGS) viewfile.c
$(OUTPATH)wildcard$(OBJ): defs.h error.h system.h wildcard.h wildcard.c
$(CC) $(CFLAGS) wildcard.c
$(OUTPATH)crc16$(OBJ): defs.h crc/crc16.c
$(CC) $(CFLAGS) crc/crc16.c
$(OUTPATH)crypt$(OBJ): arcdir.h choice.h defs.h error.h hpacklib.h \
filesys.h flags.h frontend.h system.h \
crypt/crypt.h crypt/md5.h crypt/mdc.h \
crypt/packet.h crypt/rsa.h io/fastio.h \
io/hpackio.h crypt/crypt.c
$(CC) $(CFLAGS) crypt/crypt.c
$(OUTPATH)md5$(OBJ): defs.h crypt/md5.h crypt/md5.c
$(CC) $(CFLAGS) crypt/md5.c
$(OUTPATH)mdc$(OBJ): defs.h error.h hpacklib.h crypt/crypt.h \
crypt/mdc.h crypt/mdc.c
$(CC) $(CFLAGS) crypt/mdc.c
$(OUTPATH)rsa$(OBJ): defs.h crypt/rsa.h crypt/rsa.c
$(CC) $(CFLAGS) crypt/rsa.c
$(OUTPATH)display$(OBJ): defs.h frontend.h hpacklib.h io/display.c
$(CC) $(CFLAGS) io/display.c
$(OUTPATH)fastio$(OBJ): arcdir.h defs.h error.h flags.h frontend.h \
hpacklib.h system.h crc/crc16.h crypt/crypt.h \
data/ebcdic.h io/fastio.h io/hpackio.h \
io/fastio.c
$(CC) $(CFLAGS) io/fastio.c
$(OUTPATH)hpaktext$(OBJ): defs.h error.h errorlvl.h language/hpaktext.c
$(CC) $(CFLAGS) language/hpaktext.c
$(OUTPATH)lza$(OBJ): defs.h choice.h error.h flags.h hpacklib.h system.h \
crc/crc16.h crypt/crypt.h io/fastio.h \
io/hpackio.h lza/model.h lza/model2.h lza/model3.h \
lza/model4.h lza/lza.c
$(CC) $(CFLAGS) lza/lza.c
$(OUTPATH)model$(OBJ): defs.h error.h flags.h hpacklib.h io/hpackio.h \
lza/model.h lza/model.c
$(CC) $(CFLAGS) lza/model.c
$(OUTPATH)model2$(OBJ): defs.h lza/model2.h lza/model2.c
$(CC) $(CFLAGS) lza/model2.c
$(OUTPATH)model3$(OBJ): defs.h lza/model3.h lza/model3.c
$(CC) $(CFLAGS) lza/model3.c
$(OUTPATH)model4$(OBJ): defs.h lza/model4.h lza/model4.c
$(CC) $(CFLAGS) lza/model4.c
$(OUTPATH)pack$(OBJ): defs.h io/hpackio.h io/fastio.h lza/pack.c
$(CC) $(CFLAGS) lza/pack.c
$(OUTPATH)unpack$(OBJ): defs.h crc/crc16.h io/hpackio.h io/fastio.h \
lza/model.h lza/unpack.c
$(CC) $(CFLAGS) lza/unpack.c
$(OUTPATH)store$(OBJ): defs.h error.h hpacklib.h system.h crc/crc16.h \
crypt/crypt.h io/fastio.h io/hpackio.h \
store/store.h store/store.c
$(CC) $(CFLAGS) store/store.c
# Note: The following two rules are for emx - not sure what other compilers
# will use (the standard 32-bit version is compiled with emx).
$(PROJ): $(OUTPATH)arcdir$(OBJ) $(OUTPATH)arcdirio$(OBJ) \
$(OUTPATH)archive$(OBJ) $(OUTPATH)cli$(OBJ) \
$(OUTPATH)display$(OBJ) $(OUTPATH)error$(OBJ) \
$(OUTPATH)fastio$(OBJ) $(OUTPATH)filesys$(OBJ) \
$(OUTPATH)frontend$(OBJ) $(OUTPATH)hpaktext$(OBJ) \
$(OUTPATH)script$(OBJ) $(OUTPATH)tags$(OBJ) \
$(OUTPATH)viewfile$(OBJ) $(OUTPATH)wildcard$(OBJ) \
$(OUTPATH)crc16$(OBJ) $(OUTPATH)crypt$(OBJ) $(OUTPATH)md5$(OBJ) \
$(OUTPATH)mdc$(OBJ) $(OUTPATH)rsa$(OBJ) $(OUTPATH)os2$(OBJ) \
$(OUTPATH)lza$(OBJ) $(OUTPATH)model$(OBJ) $(OUTPATH)model2$(OBJ) \
$(OUTPATH)model3$(OBJ) $(OUTPATH)model4$(OBJ) \
$(OUTPATH)pack$(OBJ) $(OUTPATH)unpack$(OBJ) $(OUTPATH)store$(OBJ)
$(LD) $(OUTPATH)arcdir$(OBJ) $(OUTPATH)arcdirio$(OBJ) \
$(OUTPATH)archive$(OBJ) $(OUTPATH)cli$(OBJ) $(OUTPATH)display$(OBJ) \
$(OUTPATH)error$(OBJ) $(OUTPATH)fastio$(OBJ) $(OUTPATH)filesys$(OBJ) \
$(OUTPATH)frontend$(OBJ) $(OUTPATH)hpaktext$(OBJ) \
$(OUTPATH)script$(OBJ) $(OUTPATH)tags$(OBJ) $(OUTPATH)viewfile$(OBJ) \
$(OUTPATH)wildcard$(OBJ) $(OUTPATH)crc16$(OBJ) $(OUTPATH)crypt$(OBJ) \
$(OUTPATH)md5$(OBJ) $(OUTPATH)mdc$(OBJ) $(OUTPATH)rsa$(OBJ) \
$(OUTPATH)os2$(OBJ) $(OUTPATH)store$(OBJ) $(OUTPATH)lza$(OBJ) \
$(OUTPATH)model$(OBJ) $(OUTPATH)model2$(OBJ) $(OUTPATH)model3$(OBJ) \
$(OUTPATH)model4$(OBJ) $(OUTPATH)pack$(OBJ) $(OUTPATH)unpack$(OBJ) \
$(LFLAGS)
$(PROJ)$(EXE): $(PROJ)
$(EMXBINDIR)\emxbind $(EMXBINDIR)\emxl.exe $(PROJ) $(PROJ)$(EXE) -s32000
# I am not sure what to make the stack (-s32000)
#****************************************************************************
#* *
#* Defines for each compiler/OS variation *
#* *
#****************************************************************************
# Generic 32-bit version: Use gcc/emx
32bit:
@$(MAKE) -f makefile.os2 hpack.exe CC="gcc" CMDC="-DOS2_32 -D__GCC__" \
CMDL="-los2 -v"
# Microsoft C: Use cl
microsoft:
@$(MAKE) hpack.exe CC=cl CMDC=-ml
# TopSpeed C: Use tsc (NB should use the TopSpeed better-make, not this
# makefile).
topspeed:
@$(MAKE) hpack.exe CC=tsc
# Watcom C: Use wc (Ba-woosh!)
watcom:
@$(MAKE) hpack.exe CC=wc
# Zortech C: Use zcc, -Ju to ignore signed/unsigned chars
zortech:
@$(MAKE) hpack.exe CC="ztc" CMDC="-Ju -ml"