File: Makefile.in

package info (click to toggle)
knockd 0.5-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 436 kB
  • ctags: 107
  • sloc: sh: 2,546; ansic: 1,566; makefile: 51
file content (85 lines) | stat: -rw-r--r-- 2,254 bytes parent folder | download | duplicates (3)
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
#
#  knock
#
#  Copyright (c) 2004 by Judd Vinet <jvinet@zeroflux.org>
#
#  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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 
#  USA.
#

DESTDIR =
prefix = @prefix@
exec_prefix = @prefix@

VERSION = 0.5

BINDIR  = @bindir@
SBINDIR = @sbindir@
MANDIR  = @mandir@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@

TOPDIR = @srcdir@
SRCDIR = $(TOPDIR)/src/
OBJDIR = $(TOPDIR)/src/
MANSRC = $(TOPDIR)/doc/

CXX = @CC@
CXXFLAGS += @CFLAGS@ -g -Wall -pedantic -fno-exceptions \
            -D_GNU_SOURCE -I.
LDFLAGS += @LDFLAGS@

SRCS = $(SRCDIR)knockd.c \
			 $(SRCDIR)knock.c \
			 $(SRCDIR)list.c

all: knockd knock man

knockd: $(OBJDIR)knockd.o $(OBJDIR)list.o
	$(CXX) $(OBJDIR)knockd.o $(OBJDIR)list.o -o $@ $(LDFLAGS) -lpcap

knock: $(OBJDIR)knock.o
	$(CXX) $(OBJDIR)knock.o -o $@ $(LDFLAGS)

.c.o: $(SRCS)
	$(CXX) $(CXXFLAGS) -o $@ -c $<

man: $(MANSRC)knockd.1 $(MANSRC)knock.1

%.1: %.1.in
	sed -e "s/#VERSION#/$(VERSION)/" $< > $@

dist: distclean
	(cd ..; tar czvf knock-$(VERSION).tar.gz knock-$(VERSION))

install: all
	$(INSTALL) -D -m0755 knockd $(DESTDIR)$(SBINDIR)/knockd
	$(INSTALL) -D -m0755 knock $(DESTDIR)$(BINDIR)/knock
	$(INSTALL) -D -m0644 $(MANSRC)knockd.1 $(DESTDIR)$(MANDIR)/man1/knockd.1
	$(INSTALL) -D -m0644 $(MANSRC)knock.1 $(DESTDIR)$(MANDIR)/man1/knock.1
	$(INSTALL) -D -m0644 knockd.conf $(DESTDIR)/etc/knockd.conf

clean:
	rm -f *~ $(OBJDIR)*.o $(MANSRC)*.1

distclean: clean
	rm -f knockd knock
	rm -f Makefile
	rm -f config.h config.status config.log

# End of file