forked from tjko/nxgipd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
126 lines (87 loc) · 3.05 KB
/
Makefile.in
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#########################################################################
# $Id$
#
# Makefile for nxgipd
#
Version = 1.1.1beta
PKGNAME = nxgipd
BuildDate = $(shell date +%Y-%m-%d)
SHELL = /bin/sh
DEFS = @DEFS@
DEFS += -DVERSION=\"$(Version)\" -DBUILDDATE=\"$(BuildDate)\"
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
# Where to install the executables.
bindir = $(exec_prefix)/bin
# Where to install the system executables.
sbindir = $(exec_prefix)/sbin
# Where to put libraries
libdir = $(prefix)/lib
# Where to put the Info files
infodir = $(prefix)/share/info
# Where to put the manual pages.
mandir = $(prefix)/share/man
CC = @CC@
XCPPFLAGS = @CPPFLAGS@
CFLAGS = -Wall @CFLAGS@ $(XCPPFLAGS) $(DEFS)
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
#CFLAGS += -Wall -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2
# link against shared libmxml
#LIBS = -lmxml
# link against static libmxml
#LIBS = -Wl,-Bstatic -lmxml -Wl,-Bdynamic -lpthread
STRIP = strip
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@SET_MAKE@
# should be no reason to modify lines below this
#########################################################################
DIRNAME = $(shell basename `pwd`)
DISTNAME = $(PKGNAME)-$(Version)
PROGS = $(PKGNAME) nxstat nxcmd
COMMON_OBJS = configuration.o misc.o @GNUGETOPT@ @STRLFUNCS@
NXSTAT_OBJS = nxstat.o nx-584.o $(COMMON_OBJS)
NXCMD_OBJS = nxcmd.o $(COMMON_OBJS)
OBJS = nx-584.o probe.o process.o ipc.o trigger.o $(PKGNAME).o $(COMMON_OBJS)
all: $(PROGS)
$(PKGNAME): $(OBJS)
$(CC) $(CFLAGS) -o $(PKGNAME) $(OBJS) $(LDFLAGS) $(LIBS)
nxstat: $(NXSTAT_OBJS)
$(CC) $(CFLAGS) -o nxstat $(NXSTAT_OBJS) $(LDFLAGS) $(LIBS)
nxcmd: $(NXCMD_OBJS)
$(CC) $(CFLAGS) -o nxcmd $(NXCMD_OBJS) $(LDFLAGS) $(LIBS)
strip:
for i in $(PROGS) ; do [ -x $$i ] && $(STRIP) $$i ; done
clean:
rm -f *~ *.o core a.out make.log \#*\# $(PROGS) *.o
clean_all: clean
rm -f Makefile config.h config.log config.cache config.status
dist: clean_all
(cd .. ; tar cvzf $(DISTNAME).tar.gz $(DIRNAME))
backup: dist
archive:
git archive --format tar --prefix ${DISTNAME}/ -o ../${DISTNAME}.tar master
gzip -v -9 ../${DISTNAME}.tar
install: all install.dirs install.man
$(INSTALL) -m 755 $(PKGNAME) $(INSTALL_ROOT)/$(sbindir)/$(PKGNAME)
$(INSTALL) -m 755 nxstat $(INSTALL_ROOT)/$(bindir)/nxstat
$(INSTALL) -m 755 nxcmd $(INSTALL_ROOT)/$(bindir)/nxcmd
printable.man:
groff -Tps -mandoc ./$(PKGNAME).1 >$(PKGNAME).ps
groff -Tascii -mandoc ./$(PKGNAME).1 | tee $(PKGNAME).prn | sed 's/.//g' >$(PKGNAME).txt
install.man: install.dirs
$(INSTALL) -m 644 $(PKGNAME).1 $(INSTALL_ROOT)/$(mandir)/man1/$(PKGNAME).1
$(INSTALL) -m 644 nxstat.1 $(INSTALL_ROOT)/$(mandir)/man1/nxstat.1
$(INSTALL) -m 644 nxcmd.1 $(INSTALL_ROOT)/$(mandir)/man1/nxcmd.1
install.dirs:
$(INSTALL) -d -m 755 $(INSTALL_ROOT)/$(mandir)/man1
$(INSTALL) -d -m 755 $(INSTALL_ROOT)/$(bindir)
$(INSTALL) -d -m 755 $(INSTALL_ROOT)/$(sbindir)
# a tradition !
love:
@echo "Not War - Eh?"
# eof