first pass for new make
[unix-history] / usr / src / usr.bin / compress / Makefile
index 9eadc3c..0c749b2 100644 (file)
@@ -1,23 +1,19 @@
-#
-#      @(#)Makefile    5.4 (Berkeley) %G%
-#
-COMFLAGS=-DBSD4_2 -O -DSACREDMEM=256000
-BIN=${DESTDIR}/usr/ucb
+#      @(#)Makefile    5.12 (Berkeley) %G%
 
 
-compress: compress.c USERMEM
-       cc $(COMFLAGS) -DUSERMEM=`cat USERMEM` -o compress compress.c
+PROG=  compress
+CFLAGS+=-DBSD4_2 -DSACREDMEM=256000 -DUSERMEM=`cat USERMEM`
+DPADD= ${LIBCOMPAT}
+LDADD= -lcompat
+LINKS= ${BINDIR}/compress ${BINDIR}/uncompress \
+       ${BINDIR}/compress ${BINDIR}/zcat
+MLINKS=        compress.1 uncompress.1 compress.1 zcat.1
+
+all: USERMEM
 
 # 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
 # less than 1 Meg.
 
 # 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
 # less than 1 Meg.
-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
+USERMEM: ${.CURDIR}/usermem.sh
+       sh ${.CURDIR}/usermem.sh > USERMEM
 
 
-clean:
-       rm -f compress USERMEM core errs
+.include <bsd.prog.mk>