4 # $Header: makefile 1.30 92/12/23 $
6 # SYSTYPE: POSIX, RISCOS, WINNT
9 INSTALLDIR= $${HOME}/bin
12 # Under System V change "install" to "cp"
15 # --- You shouldn't need to edit below this line ---
17 BACKUPFILE = $${HOME}/tmp/nspark.zip
21 CFLAGS = $(CDEFINES) $(CMISC) -Wall -Werror
25 TESTPACK = testprog/testpack$(EXE)
26 SRCS = store.c pack.c compress.c crc.c \
27 io.c error.c misc.c date.c arcfs.c garble.c
28 HDRS = store.h pack.h compress.h crc.h \
29 nsparkio.h error.h misc.h date.h os.h spark.h arcfs.h garble.h version.h
30 OBJS = store$(OBJ) pack$(OBJ) compress$(OBJ) crc$(OBJ) \
31 io$(OBJ) error$(OBJ) misc$(OBJ) date$(OBJ) arcfs$(OBJ) garble$(OBJ)
33 NSPARKSRCS = main.c arc.c unarc.c
34 NSPARKHDRS = main.h arc.h unarc.h
35 NSPARKOBJS = main$(OBJ) arc$(OBJ) unarc$(OBJ)
37 SQSHSRCS = sqshmain.c unarc.c
39 SQSHOBJS = sqshmain$(OBJ) unarc$(OBJ)
41 TESTPACKSRCS = testprog/pack.c
42 TESTPACKOBJS = testprog/pack$(OBJ)
46 ifeq (${SYSTYPE},RISCOS)
55 ifeq (${SYSTYPE},POSIX)
60 # BB: For SGI systems fitted with a MIPS R4000 or better, add -mips2 to CFLAGS.
62 # BB: For SGI systems use LIBS -lc_s -s.
66 ifeq (${SYSTYPE},WINNT)
76 all: $(PROG) $(TESTPACK) $(SQSH)
78 $(TESTPACK): $(OBJS) $(TESTPACKOBJS)
79 $(CC) -o $(TESTPACK) $(OBJS) $(TESTPACKOBJS) $(LIBS)
81 $(PROG): $(OBJS) $(NSPARKOBJS)
82 $(CC) -o $(PROG) $(OBJS) $(NSPARKOBJS) $(LIBS)
84 $(SQSH): $(OBJS) $(SQSHOBJS)
85 $(CC) -o $(SQSH) $(OBJS) $(SQSHOBJS) $(LIBS)
87 install: $(PROG) $(SQSH)
88 $(INSTALL) $(PROG) $(INSTALLDIR)
89 $(INSTALL) $(SQSH) $(INSTALLDIR)
91 depend: $(SRCS) $(HDRS) $(NSPARKSRCS) $(NSPARKHDRS) $(SQSHSRCS) $(SQSHHDRS)
92 makedepend -w200 $(CDEFINES) -D$(SYSTYPE) -- $(SRCS) $(NSPARKSRCS) $(SQSHSRCS)
93 mv makefile makefile.old
94 sed -f nosysdep.sed < makefile.old > makefile
95 rm -f makefile.old makefile.bak
101 rm -f $(PROG) $(TESTPACK) $(SQSH) $(OBJS) $(NSPARKOBJS) $(TESTPACKOBJS) $(SQSHOBJS)
105 (cd ..; zip -r9y $(BACKUPFILE) nspark)
108 DISTLEAF = nspark-$(VERSION)
109 DISTDIR = $(TMPDIR)/$(DISTLEAF)
110 dist: clean $(SRCS) $(HDRS)
111 rm -f RCS/rel-$(VERSION)
112 makerel makefile *.c *.h > RCS/rel-$(VERSION)
113 chmod 444 RCS/rel-$(VERSION)
115 cp *.c *.h nosysdep.sed README BUGS CHANGES makefile $(DISTDIR)
116 mkdir $(DISTDIR)/mkfiles
117 cp mkfiles/* $(DISTDIR)/mkfiles
118 (cd $(TMPDIR); tar cf - $(DISTLEAF) | compress > $(DISTLEAF).tar.Z)
119 (cd $(TMPDIR); rm -rf $(DISTLEAF))
122 $(CC) $(CFLAGS) -c -o $@ $<
124 # DO NOT DELETE THIS LINE -- make depend depends on it.
126 main$(OBJ): spark.h nsparkio.h error.h misc.h arc.h unarc.h garble.h version.h
127 arc$(OBJ): spark.h error.h
128 unarc$(OBJ): spark.h store.h pack.h compress.h main.h nsparkio.h misc.h os.h error.h crc.h arcfs.h
129 sqshmain$(OBJ): spark.h arcfs.h unarc.h
130 store$(OBJ): spark.h main.h crc.h garble.h nsparkio.h
131 pack$(OBJ): spark.h main.h crc.h garble.h nsparkio.h pack.h
132 compress$(OBJ): spark.h pack.h main.h crc.h garble.h nsparkio.h arcfs.h
133 arcfs$(OBJ): spark.h arcfs.h nsparkio.h misc.h
134 garble$(OBJ): garble.h
135 crc$(OBJ): spark.h main.h arcfs.h
136 io$(OBJ): spark.h main.h error.h arcfs.h nsparkio.h
138 misc$(OBJ): spark.h main.h date.h misc.h
140 unix$(OBJ): spark.h date.h
141 acorn$(OBJ): spark.h date.h
142 msdos$(OBJ): spark.h date.h os.h
143 winnt$(OBJ): spark.h date.h