aboutsummaryrefslogtreecommitdiff
path: root/pan
diff options
context:
space:
mode:
authoryaberauneya <yaberauneya>2009-10-09 17:55:43 +0000
committeryaberauneya <yaberauneya>2009-10-09 17:55:43 +0000
commitef77253961f909f87e82e6d2b620e87af33e9665 (patch)
tree7b2efccc437c2dd915dc97ccc10d97c3900a8503 /pan
parent971c9e8bd376597750794de1dbfb939ba9be5ae0 (diff)
1. Please see README.mk-devel for a full description of the changes
from a Make perspective. 2. Several files were changed to accomodate correct installation practices, most notably ones in testcases/network/{ipv6,tcp_cmds}, testcases/kernel/sched/hyperthreading/ht_enabled/..., and some items in tools/..., and also to avoid collisions as far as installed testcases (scripts, compiled C apps) were concerned. 3. Several apps weren't autoconf safe and some autoconf tests and conditional statements have been placed in sourcecode and in Makefiles to either a) prevent the tests from being built / installed or b) turn the tests into dummy apps which print out TCONF messages due to lack-of-build support. Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Diffstat (limited to 'pan')
-rw-r--r--pan/Makefile59
1 files changed, 42 insertions, 17 deletions
diff --git a/pan/Makefile b/pan/Makefile
index 234f9d42c..d973d587b 100644
--- a/pan/Makefile
+++ b/pan/Makefile
@@ -1,24 +1,49 @@
-
-LOADLIBES += -lm
-LFLAGS += -l -w
-CFLAGS += -w
-PREFIX = /opt/ltp
-
-all: ltp-pan ltp-bump ltp-scanner
-
-ltp-pan: ltp-pan.o zoolib.o splitstr.o
-
+#
+# pan Makefile.
+#
+# Copyright (C) 2009, Cisco Systems Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Garrett Cooper, July 2009
+#
+
+top_srcdir ?= ..
+
+include $(top_srcdir)/include/mk/env_pre.mk
+include $(top_srcdir)/include/mk/functions.mk
+
+CPPFLAGS += -I$(abs_srcdir)
+
+LDLIBS += -lm $(LEXLIB)
+
+LFLAGS += -l
+
+INSTALL_DIR := bin
+
+MAKE_TARGETS := ltp-bump ltp-pan ltp-scanner
ltp-bump: ltp-bump.o zoolib.o
+ltp-pan: ltp-pan.o zoolib.o splitstr.o
ltp-scanner: scan.o ltp-scanner.o reporter.o tag_report.o symbol.o splitstr.o debug.o
+# flex does some whacky junk when it generates files on the fly, so let's make
+# sure gcc doesn't get lost...
+$(eval $(call generate_vpath_rule,c,$(abs_srcdir):$(abs_builddir)))
+$(eval $(call generate_vpath_rule,l))
-install: ltp-pan ltp-bump ltp-scanner
- install -D ltp-scanner $(DESTDIR)/$(PREFIX)/bin/ltp-scanner
- install -D ltp-pan $(DESTDIR)/$(PREFIX)/bin/ltp-pan
- install -D ltp-bump $(DESTDIR)/$(PREFIX)/bin/ltp-bump
-
-clean:
- rm -f *.o ltp-pan ltp-bump ltp-scanner
+include $(top_srcdir)/include/mk/generic_leaf_target.mk