summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ipf
diff options
context:
space:
mode:
authorGordon Ross <gwr@nexenta.com>2013-08-23 18:31:03 -0400
committerGordon Ross <gwr@nexenta.com>2013-08-30 14:41:32 -0400
commitb6805bf78d2bbbeeaea8909a05623587b42d58b3 (patch)
tree1ed4f5376932228adba6378d95bbea467bdea834 /usr/src/cmd/ipf
parenta9478106a12424322498e53cf7cd75bd8a4d6004 (diff)
downloadillumos-joyent-b6805bf78d2bbbeeaea8909a05623587b42d58b3.tar.gz
4072 make clobber leaves trash
Reviewed by: Albert Lee <trisk@nexenta.com> Reviewed by: Dan McDonald <danmcd@nexenta.com> Reviewed by: Marcel Telka <marcel.telka@nexenta.com> Reviewed by: Richard Lowe <richlowe@richlowe.net> Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/cmd/ipf')
-rw-r--r--usr/src/cmd/ipf/examples/Makefile4
-rw-r--r--usr/src/cmd/ipf/tools/Makefile10
-rw-r--r--usr/src/cmd/ipf/tools/Makefile.tools28
3 files changed, 32 insertions, 10 deletions
diff --git a/usr/src/cmd/ipf/examples/Makefile b/usr/src/cmd/ipf/examples/Makefile
index aba12bbffc..078c7eef53 100644
--- a/usr/src/cmd/ipf/examples/Makefile
+++ b/usr/src/cmd/ipf/examples/Makefile
@@ -38,6 +38,8 @@ SHSRCS= $(SHPROG:%=%.sh)
include ../../Makefile.cmd
+CLOBBERFILES = $(SHPROG)
+
SHAREIPF= $(ROOT)/usr/share/ipfilter
SHAREIPFX= $(SHAREIPF)/examples
@@ -63,8 +65,6 @@ all: $(SHPROG)
clean:
-clobber:
-
install: all $(SHAREIPF) $(SHAREIPFX) \
$(IPFEXAMPLES) $(IPFEXSHPROG)
diff --git a/usr/src/cmd/ipf/tools/Makefile b/usr/src/cmd/ipf/tools/Makefile
index 0562aca48e..03bb135de2 100644
--- a/usr/src/cmd/ipf/tools/Makefile
+++ b/usr/src/cmd/ipf/tools/Makefile
@@ -54,17 +54,13 @@ $(USRLIBIPF)/% : %
.KEEP_STATE:
-all: $(SUBDIRS)
+all clean clobber lint: $(SUBDIRS)
-clean clobber lint: $(SUBDIRS)
+install: all $(SUBDIRS) install_local
-install: all $(SUBDIRS) $(USRLIBIPF) \
- $(USRLIBIPFLICENCE)
+install_local: $(USRLIBIPF) $(USRLIBIPFLICENCE)
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET)
-
FRC:
-
-include ../../Makefile.targ
diff --git a/usr/src/cmd/ipf/tools/Makefile.tools b/usr/src/cmd/ipf/tools/Makefile.tools
index 71f81169f1..5d8bee1d04 100644
--- a/usr/src/cmd/ipf/tools/Makefile.tools
+++ b/usr/src/cmd/ipf/tools/Makefile.tools
@@ -22,6 +22,8 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+#
PROG= ipf ipfs ipmon ipnat ippool ipfstat
IPFPROG= ipftest
@@ -43,7 +45,7 @@ IPFTEST_OBJS= ipftest.o \
ip_pool.o radix.o
OBJS= $(IPF_OBJS) $(IPFS_OBJS) $(IPFSTAT_OBJS) \
- $(IPMON_OBJS) $(IPNAT_OBJS) $(IPFTEST_OBJS)
+ $(IPMON_OBJS) $(IPNAT_OBJS) $(IPPOOL_OBJS) $(IPFTEST_OBJS)
OBJSL= $(IPF_OBJS) $(IPFS_OBJS) $(IPFSTAT_OBJS) \
$(IPMON_OBJS) $(IPNAT_OBJS)
@@ -69,6 +71,7 @@ ipnat := LDLIBS += -lsocket -lnsl -lkvm -lelf
ippool := LDLIBS += -lsocket -lnsl -lkvm -lelf
CLEANFILES += $(OBJS)
+CLOBBERFILES += $(IPFPROG)
ROOTIPF= $(ROOTLIB)/ipf
ROOTIPF32= $(ROOTIPF)/$(MACH32)
@@ -80,6 +83,8 @@ ROOTIPFPROG64= $(IPFPROG:%=$(ROOTIPF64)/%)
ROOTIPFLINKS= $(IPFPROG:%=$(ROOTIPF)/%)
ROOTUSRSBINLINKS= $(PROG:%=$(ROOTUSRSBIN)/%)
+all:
+
$(ROOTIPF32):
$(INS.dir)
@@ -118,6 +123,9 @@ ipf_y.o: ../ipf_y.c $(COMMONIPF)/netinet/ip_fil.h $(COMMONIPF)/ipf.h \
sed -e 's/yy/ipf_yy/g' -e 's/y.tab.h/ipf_y.h/' \
ipf.tab.h > ../ipf_y.h
+CLEANFILES += ipf.tab.c ipf.tab.h
+CLEANFILES += ../ipf_y.c ../ipf_y.h
+
ipf_l.o: ../ipf_l.c $(COMMONIPF)/netinet/ip_fil.h $(COMMONIPF)/ipf.h \
../ipf_y.h ../ipf_l.h
$(COMPILE.c) ../ipf_l.c -o $@
@@ -129,6 +137,9 @@ ipf_l.o: ../ipf_l.c $(COMMONIPF)/netinet/ip_fil.h $(COMMONIPF)/ipf.h \
../ipf_l.h: ../lexer.h
sed -e 's/yy/ipf_yy/g' ../lexer.h > $@
+CLEANFILES += ../ipf_l.c ../ipf_l.h
+
+
ipfs: $(IPFS_OBJS)
$(LINK.c) -o ipfs $(IPFS_OBJS) $(LDLIBS)
$(POST_PROCESS)
@@ -153,6 +164,9 @@ ipmon_y.o: ../ipmon_y.c $(COMMONIPF)/ipmon.h \
sed -e 's/yy/ipmon_yy/g' -e 's/y.tab.h/ipmon_y.h/' \
ipmon.tab.h > ../ipmon_y.h
+CLEANFILES += ipmon.tab.c ipmon.tab.h
+CLEANFILES += ../ipmon_y.c ../ipmon_y.h
+
ipmon_l.o: ../ipmon_l.c $(COMMONIPF)/ipmon.h ../ipmon_y.h ../ipmon_l.h
$(COMPILE.c) ../ipmon_l.c -o $@
@@ -163,6 +177,8 @@ ipmon_l.o: ../ipmon_l.c $(COMMONIPF)/ipmon.h ../ipmon_y.h ../ipmon_l.h
../ipmon_l.h: ../lexer.h
sed -e 's/yy/ipmon_yy/g' ../lexer.h > $@
+CLEANFILES += ../ipmon_l.c ../ipmon_l.h
+
ipnat: $(IPNAT_OBJS) $(LIBIPF) $(MAPFILE.NGB)
$(LINK.c) -o ipnat $(IPNAT_OBJS) $(LDLIBS)
$(POST_PROCESS)
@@ -179,6 +195,9 @@ ipnat_y.o: ../ipnat_y.c $(COMMONIPF)/netinet/ip_nat.h \
sed -e 's/yy/ipnat_yy/g' -e 's/y.tab.h/ipnat_y.h/' \
ipnat.tab.h > ../ipnat_y.h
+CLEANFILES += ipnat.tab.c ipnat.tab.h
+CLEANFILES += ../ipnat_y.c ../ipnat_y.h
+
ipnat_l.o: ../ipnat_l.c $(COMMONIPF)/netinet/ip_nat.h ../ipnat_l.h
$(COMPILE.c) ../ipnat_l.c -o $@
@@ -189,6 +208,8 @@ ipnat_l.o: ../ipnat_l.c $(COMMONIPF)/netinet/ip_nat.h ../ipnat_l.h
../ipnat_l.h: ../lexer.h
sed -e 's/yy/ipnat_yy/g' ../lexer.h > $@
+CLEANFILES += ../ipnat_l.c ../ipnat_l.h
+
ippool: $(IPPOOL_OBJS) $(LIBIPF) $(MAPFILE.NGB)
$(LINK.c) -o ippool $(IPPOOL_OBJS) $(LDLIBS)
$(POST_PROCESS)
@@ -205,6 +226,9 @@ ippool_y.o: ../ippool_y.c $(COMMONIPF)/netinet/ip_pool.h \
sed -e 's/yy/ippool_yy/g' -e 's/y.tab.h/ippool_y.h/' \
ippool.tab.h > ../ippool_y.h
+CLEANFILES += ippool.tab.c ippool.tab.h
+CLEANFILES += ../ippool_y.c ../ippool_y.h
+
ippool_l.o: ../ippool_l.c $(COMMONIPF)/netinet/ip_pool.h ../ippool_l.h
$(COMPILE.c) ../ippool_l.c -o $@
@@ -215,6 +239,8 @@ ippool_l.o: ../ippool_l.c $(COMMONIPF)/netinet/ip_pool.h ../ippool_l.h
../ippool_l.h: ../lexer.h
sed -e 's/yy/ippool_yy/g' ../lexer.h > $@
+CLEANFILES += ../ippool_l.c ../ippool_l.h
+
ipftest: $(IPFTEST_OBJS) $(LIBIPF) $(MAPFILE.NGB)
$(LINK.c) $(ZIGNORE) -o ipftest $(IPFTEST_OBJS) $(LDLIBS)
$(POST_PROCESS)