forked from ksalin/ipxgw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
56 lines (49 loc) · 1.13 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
# Makefile to build and install the SDL library
top_builddir = .
srcdir = @srcdir@
objects = build
gen = gen
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
datarootdir = @datarootdir@
datadir = @datadir@
auxdir = @datarootdir@/aux
distpath = $(srcdir)/..
distdir = $(BUILD_NAME)-@SDL_VERSION@
distfile = $(distdir).tar.gz
#@SET_MAKE@
SHELL = @SHELL@
CC = @CC@
INCLUDE = -I$(includedir)
CFLAGS =
EXTRA_CFLAGS =
LDFLAGS =
EXTRA_LDFLAGS =
LIBTOOL = libtool
INSTALL = install
AR = ar
RANLIB = ranlib
WINDRES = windres
all: ipxgw
ipxgw: ipxgw.o
g++ -Wall ipxgw.o `pkg-config --libs SDL_net` -lpcap -o ipxgw
ipxgw.o: ipxgw.cpp config.h
g++ -Wall `pkg-config --cflags SDL_net` -c ipxgw.cpp
clean:
rm -fv *.o ipxgw
install: ipxgw
$(info Installing...)
#Requiring user rights for pcap
#Make sure that the group exists
@groupadd -f pcap
ifneq (,$(PCAPUSER))
usermod -a -G pcap $(PCAPUSER)
endif
$(INSTALL) -m 0755 ipxgw $(bindir)
$(info Adding pcap rights...)
#Set the pcap rights to the app!
@chgrp pcap $(bindir)/ipxgw
@setcap cap_net_raw,cap_net_admin=eip $(bindir)/ipxgw