home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 9 Archive
/
09-Archive.zip
/
FREEZE-2.ZIP
/
makefile
< prev
next >
Wrap
Makefile
|
1992-07-18
|
3KB
|
148 lines
# SHELL = /bin/sh
# MAKEFILE = makefile
default:
@echo ''
@echo 'Please indicate the system to make Freeze for.'
@echo 'Possible choices are: bsd, sysv, x286, sun4,'
@echo 'generic.'
@echo ''
DEST = /usr/local/bin
MANDEST = /usr/local/man/man1
SEC = 1
HDRS = bitio.h\
compat.h\
freeze.h\
huf.h\
lz.h\
patchlevel.h
CC = gcc
# or proprietary compiler, if it's better than that
OPTIONS = -DCOMPAT
LINTFLAGS = -DBITS=15 -DSIGTYPE=void -DCOMPAT -DDEBUG\
-DGATHER_STAT -x -DFAST
OBJS = bitio.o\
debug.o\
decode.o\
default.o\
encode.o\
freeze.o\
huf.o\
lz.o
PROGRAM = freeze
CATMAN = freeze.man statist.man
MAN = freeze.1 statist.1
SRCS = bitio.c\
debug.c\
decode.c\
default.c\
encode.c\
freeze.c\
huf.c\
lz.c
.SUFFIXES: .1 .man
.1.man:
nroff -man < $< > $@
.c.o:
$(CC) -c $(CFLAGS) $(OPTIONS) $<
prog: $(PROGRAM)$(EXE) statist$(EXE)
man: $(CATMAN)
lint: $(SRCS)
lint $(LINTFLAGS) $(SRCS) > lint.out
$(PROGRAM)$(EXE): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)$(EXE)
statist$(EXE): statist.o lz.o
$(CC) $(CFLAGS) $(LDFLAGS) -o statist$(EXE) statist.o lz.o $(LIBS)
clobber: clean
rm -f $(PROGRAM) statist *.man
clean:; rm -f *.o *.b .,* core *.out
install: $(DEST)/$(PROGRAM) $(DEST)/statist $(MANDEST)/freeze.$(SEC) $(MANDEST)/statist.$(SEC)
patch:; rm -f patch.out
-for i in ../distribution/* ; do \
(diff -c $$i `basename $$i` >> patch.out); \
done
$(DEST)/$(PROGRAM): $(PROGRAM)
cp $(PROGRAM) $@
chmod 755 $@
-strip $@
-mcs -d $@
-ln -f $@ $(DEST)/melt
-ln -f $@ $(DEST)/fcat
$(DEST)/statist: statist
cp statist $@
chmod 755 $@
-strip $@
-mcs -d $@
$(MANDEST)/freeze.$(SEC): freeze.1
cp freeze.1 $@
chmod +r $@
-ln -f $@ $(MANDEST)/melt.$(SEC)
-ln -f $@ $(MANDEST)/fcat.$(SEC)
$(MANDEST)/statist.$(SEC): statist.1
cp statist.1 $@
chmod +r $@
bsd:
$(MAKE) prog CFLAGS="-O -DBSD -DUTIMES -DBITS=16\
-DFAST -DSIGTYPE=void"
sysv:
$(MAKE) prog CFLAGS="-O -DBITS=16 -DFAST -DSIGTYPE=void"\
LIBS="-lc_s"
x286:
$(MAKE) prog CC=cc CFLAGS="-Ox -Mc2 -DBITS=16 -DFAST\
-DSIGTYPE=int"
x286install:
$(MAKE) install MANDEST=/usr/man/man.C SEC=C
generic:
$(MAKE) prog CFLAGS="-O -DBITS=16 -DFAST -DSIGTYPE=int"
sun4:
$(MAKE) prog CC=cc CFLAGS="-O4 -DBSD -DSUN4 -DSIGTYPE=void\
-DUTIMES -DBITS=16 -DFAST"
os2:
$(MAKE) prog CFLAGS="-O2 -s -DOS2 -DMSDOS -DBITS=16\
-DFAST -DSIGTYPE=void" EXE=".exe" OBJS="$(OBJS) isvalid.o"\
LIBS="-los2"
###
bitio.o: freeze.h compat.h bitio.h
debug.o: freeze.h compat.h huf.h bitio.h
decode.o: freeze.h compat.h huf.h bitio.h
default.o: freeze.h compat.h
encode.o: freeze.h compat.h lz.h huf.h bitio.h
freeze.o: freeze.h compat.h lz.h huf.h
huf.o: freeze.h compat.h huf.h bitio.h
lz.o: freeze.h compat.h lz.h
statist.o: freeze.h compat.h lz.h