[go: up one dir, main page]

File: Makefile.in

package info (click to toggle)
specter 1.3%2B1.4pre2-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 728 kB
  • ctags: 531
  • sloc: ansic: 5,060; sh: 267; makefile: 238; perl: 169
file content (111 lines) | stat: -rw-r--r-- 3,636 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

include @top_srcdir@/Rules.make

CFLAGS +=-I@top_srcdir@/libipulog/include -I@top_srcdir@/include
OBJECTS	= specter.o conffile.o

SPECTER_CONFIGFILE=@sysconfdir@/specter.conf

ifeq (x@LIBIPULOG_SHARED@,x)
OBJECTS += libipulog/libipulog.a
else
LDFLAGS += -lipulog -Llibipulog/
endif



all: specter

specter: $(OBJECTS) libipulog plugins sample.conf
	$(CC) $(CFLAGS) $(TARGET_ARCH) $(LDFLAGS) -ldl $(OBJECTS) -o $@ -rdynamic

specter.o: specter.c
	$(CC) $(CFLAGS) $(TARGET_ARCH) -DSPECTER_CONFIGFILE_DEFAULT=\"$(SPECTER_CONFIGFILE)\" -c specter.c -o specter.o

edit_sample = sed -e 's,@libdir\@,$(SPECTER_LIB_PATH),g'
sample.conf: sample.conf.in
	$(edit_sample) sample.conf.in > sample.conf


# ====---- packaging stuff
dist-source: distclean
	tar zc -C .. -f `basename $$PWD`.tar.gz `basename $$PWD`

dist-slackware: distclean
	./configure --with-mysql --with-pgsql --prefix=/usr --sysconfdir=/etc
	$(MAKE) install TARGET_ARCH='-mcpu=i486' DESTDIR=`pwd`/slack-build/
	@INSTALL@ -D -m 644 specter.slack-desc @top_srcdir@/slack-build/install/slack-desc
	(cd @top_srcdir@/slack-build ; /sbin/makepkg -c n -l y ../specter-1.4-i486-1.tgz)
	$(RM) -r @top_srcdir@/slack-build

dist-redhat: dist-source
	cp -f `basename $$PWD`.tar.gz /usr/src/rpm/SOURCES
	rpmbuild -ba --target i486 specter.spec


# ====---- cleaning up
distclean: clean
	$(MAKE) distclean -C @top_srcdir@/libipulog
	$(MAKE) distclean -C @top_srcdir@/plugins
	$(MAKE) distclean -C @top_srcdir@/doc
	$(RM) Makefile config.cache config.log config.status Rules.make sample.conf tags

clean:
	$(RM) $(OBJECTS) core specter
	$(MAKE) clean -C @top_srcdir@/libipulog
	$(MAKE) clean -C @top_srcdir@/plugins
	$(MAKE) clean -C @top_srcdir@/doc


# ====---- installation
install: all
	@INSTALL@ -D -m 755 specter $(DESTDIR)@sbindir@/specter
	@[ -e $(DESTDIR)@sysconfdir@/specter.conf ] || @INSTALL@ -D -m 600 sample.conf $(DESTDIR)@sysconfdir@/specter.conf
	@INSTALL@ -D -m 644 AUTHORS $(DESTDIR)/usr/doc/specter-1.4/AUTHORS
	@INSTALL@ -D -m 644 COPYING $(DESTDIR)/usr/doc/specter-1.4/COPYING
	@INSTALL@ -D -m 644 README $(DESTDIR)/usr/doc/specter-1.4/README
	$(MAKE) install -C @top_srcdir@/libipulog
	$(MAKE) install -C @top_srcdir@/plugins
	$(MAKE) install -C @top_srcdir@/doc

install-strip: all
	@INSTALL@ -D -m 755 -s specter $(DESTDIR)@sbindir@/specter
	@[ -e $(DESTDIR)@sysconfdir@/specter.conf ] || @INSTALL@ -D -m 600 sample.conf $(DESTDIR)@sysconfdir@/specter.conf
	@INSTALL@ -D -m 644 AUTHORS $(DESTDIR)/usr/doc/specter-1.4/AUTHORS
	@INSTALL@ -D -m 644 COPYING $(DESTDIR)/usr/doc/specter-1.4/COPYING
	@INSTALL@ -D -m 644 README $(DESTDIR)/usr/doc/specter-1.4/README
	$(MAKE) install -C @top_srcdir@/libipulog
	$(MAKE) install -C @top_srcdir@/plugins
	$(MAKE) install -C @top_srcdir@/doc


# ====---- uninstallation
uninstall:
	$(RM) $(DESTDIR)@sbindir@/specter
	@echo "*** $(SPECTER_CONFIGFILE) left, remove manually."
	$(RM) $(DESTDIR)/usr/doc/specter-1.4/AUTHORS
	$(RM) $(DESTDIR)/usr/doc/specter-1.4/COPYING
	$(RM) $(DESTDIR)/usr/doc/specter-1.4/README
	$(MAKE) uninstall -C @top_srcdir@/libipulog
	$(MAKE) uninstall -C @top_srcdir@/plugins
	$(MAKE) uninstall -C @top_srcdir@/doc


# ====---- subdirs work
libipulog/libipulog.a: libipulog

.PHONY: libipulog
libipulog:
	$(MAKE) -C @top_srcdir@/libipulog

.PHONY: plugins
plugins:
	$(MAKE) -C plugins


# ====---- help ourselves
tags: specter.c include/specter/specter.h \
	conffile.c include/conffile/conffile.h \
	libipulog/libipulog.c libipulog/include/libipulog/libipulog.h
	ctags specter.c include/specter/specter.h conffile.c include/conffile/conffile.h libipulog/libipulog.c libipulog/include/libipulog/libipulog.h