lint cleanup
[unix-history] / usr / src / usr.bin / compress / Makefile
index 688c74c..7a61576 100644 (file)
@@ -1,12 +1,19 @@
 #
 #
-#      @(#)Makefile    5.3 (Berkeley) %G%
+# Copyright (c) 1987 Regents of the University of California.
+# All rights reserved.  The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
 #
 #
-# if you have bugs in your C compiler dont use -O
-COMFLAGS=-DBSD4_2 -O -DSACREDMEM=256000
-BIN=${DESTDIR}/usr/ucb
+#      @(#)Makefile    5.8     (Berkeley)      %G%
+#
+CFLAGS=        -O -DBSD4_2 -DSACREDMEM=256000 -DUSERMEM=`cat USERMEM` 
+LIBC=  /lib/libc.a
+SRCS=  compress.c
+OBJS=  compress.o
+
+all: compress
 
 
-compress : compress.c USERMEM
-       cc $(COMFLAGS) -DUSERMEM=`cat USERMEM` -o compress compress.c
+compress: USERMEM ${OBJS} ${LIBC}
+       ${CC} ${CFLAGS} -o $@ ${OBJS}
 
 # USERMEM may have to be set by hand.  It should contain the amount of
 # available user memory in bytes.  Set it to zero, for physical memory
 
 # USERMEM may have to be set by hand.  It should contain the amount of
 # available user memory in bytes.  Set it to zero, for physical memory
@@ -14,11 +21,34 @@ compress : compress.c USERMEM
 USERMEM:
        sh usermem.sh > USERMEM
 
 USERMEM:
        sh usermem.sh > USERMEM
 
-install: compress
-       install -s compress $(BIN)
-       rm -f $(BIN)/uncompress $(BIN)/zcat
-       ln $(BIN)/compress $(BIN)/uncompress
-       ln $(BIN)/compress $(BIN)/zcat
+# Temporarily don't delete USERMEM.  When chroot'ed to /nbsd, usermem.sh
+# fails totally.
+clean: FRC
+       rm -f ${OBJS} core compress
+#      rm -f ${OBJS} core compress USERMEM
+
+depend: FRC
+       mkdep ${CFLAGS} ${SRCS}
+
+install: FRC
+       install -s -o bin -g bin -m 755 compress ${DESTDIR}/usr/ucb/compress
+       rm -f ${DESTDIR}/usr/ucb/uncompress ${DESTDIR}/usr/ucb/zcat
+       ln ${DESTDIR}/usr/ucb/compress ${DESTDIR}/usr/ucb/uncompress
+       ln ${DESTDIR}/usr/ucb/compress ${DESTDIR}/usr/ucb/zcat
+
+lint: FRC
+       lint ${CFLAGS} ${SRCS}
+
+tags: FRC
+       ctags ${SRCS}
+
+FRC:
+
+# DO NOT DELETE THIS LINE -- mkdep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+compress.o: compress.c /usr/include/stdio.h /usr/include/ctype.h
+compress.o: /usr/include/signal.h /usr/include/sys/types.h
+compress.o: /usr/include/sys/stat.h
 
 
-clean:
-       rm -f compress USERMEM
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY