summaryrefslogtreecommitdiff
path: root/net/ntopng/files/patch-Makefile.in
blob: 7545df7e0e341c787e74754fa34068204a4a19b4 (plain) (blame)
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
--- Makefile.in.orig	2014-09-07 01:22:11.756545075 +0600
+++ Makefile.in	2014-09-07 01:45:36.496401797 +0600
@@ -6,67 +6,32 @@
 INSTALL_DIR=@INSTALL_DIR@
 MAN_DIR=@MAN_DIR@
 ######
-HAS_NDPI=$(shell pkg-config --exists libndpi; echo $$?)
-ifeq ($(HAS_NDPI), 0)
-    NDPI_INC = $(shell pkg-config --cflags libndpi | sed -e 's/\(-I[^ \t]*\)/\1\/libndpi/g')
-    NDPI_LIB = $(shell pkg-config --libs libndpi)
-    NDPI_LIB_DEP =
-else
-    NDPI_INC=-I./nDPI/src/include
-    NDPI_LIB=./nDPI/src/lib/.libs/libndpi.a
-    NDPI_LIB_DEP=$(NDPI_LIB)
-endif
+NDPI_INC = $(shell pkg-config --cflags libndpi | sed -e 's/\(-I[^ \t]*\)/\1\/libndpi/g')
+NDPI_LIB = $(shell pkg-config --libs libndpi)
+NDPI_LIB_DEP =
 ######
 LIBPCAP=-lpcap
 ######
 MONGOOSE_HOME=./third-party/mongoose
 MONGOOSE_INC=-I$(MONGOOSE_HOME)
 ######
-HAS_LUAJIT=$(shell pkg-config --exists luajit; echo $$?)
-ifeq ($(HAS_LUAJIT), 0)
-	LUAJIT_INC = $(shell pkg-config --cflags luajit)
-	LUAJIT_LIB = $(shell pkg-config --libs luajit)
-else
-	LUAJIT_HOME=./third-party/LuaJIT-2.0.3
-	LUAJIT_INC=-I$(LUAJIT_HOME)/src
-	LUAJIT_LIB=$(LUAJIT_HOME)/src/libluajit.a
-endif
+LUAJIT_INC = $(shell pkg-config --cflags luajit)
+LUAJIT_LIB = $(shell pkg-config --libs luajit)
 ######
-LIBRRDTOOL_HOME=third-party/rrdtool-1.4.8
-HAS_LIBRRDTOOL=$(shell pkg-config --exists librrd; echo $$?)
-ifeq ($(HAS_LIBRRDTOOL), 0)
-	LIBRRDTOOL_INC = $(shell pkg-config --cflags librrd)
-	LIBRRDTOOL_LIB = $(shell pkg-config --libs librrd)
-else
-	LIBRRDTOOL_INC=-I$(LIBRRDTOOL_HOME)/src/
-	LIBRRDTOOL_LIB=$(LIBRRDTOOL_HOME)/src/.libs/librrd_th.a
-endif
+LIBRRDTOOL_INC = $(shell pkg-config --cflags librrd)
+LIBRRDTOOL_LIB = $(shell pkg-config --libs librrd)
 ######
 HTTPCLIENT_INC=third-party/http-client-c/src/
 ######
-HAS_JSON=$(shell pkg-config --exists json-c; echo $$?)
-ifeq ($(HAS_JSON), 0)
-	JSON_INC = $(shell pkg-config --cflags json-c)
-	JSON_LIB = $(shell pkg-config --libs json-c)
-else
-	JSON_HOME=third-party/json-c
-	JSON_INC=-I$(JSON_HOME)
-	JSON_LIB=$(JSON_HOME)/.libs/libjson-c.a
-endif
+JSON_INC = $(shell pkg-config --cflags json-c)
+JSON_LIB = $(shell pkg-config --libs json-c)
 ######
-HAS_ZEROMQ=$(shell pkg-config --exists libzmq; echo $$?)
-ifeq ($(HAS_ZEROMQ), 0)
-	ZEROMQ_INC = $(shell pkg-config --cflags libzmq)
-	ZMQ_STATIC=/usr/local/lib/libzmq.a
-	ifeq ($(wildcard $(ZMQ_STATIC)),)
-		ZEROMQ_LIB = $(shell pkg-config --libs libzmq)
-	else
-		ZEROMQ_LIB = $(ZMQ_STATIC)
-	endif
+ZEROMQ_INC = $(shell pkg-config --cflags libzmq)
+ZMQ_STATIC=/usr/local/lib/libzmq.a
+ifeq ($(wildcard $(ZMQ_STATIC)),)
+	ZEROMQ_LIB = $(shell pkg-config --libs libzmq)
 else
-	ZEROMQ_HOME=./third-party/zeromq-3.2.4
-	ZEROMQ_INC=-I$(ZEROMQ_HOME)/include
-	ZEROMQ_LIB=$(ZEROMQ_HOME)/src/.libs/libzmq.a
+	ZEROMQ_LIB = $(ZMQ_STATIC)
 endif
 ######
 EWH_HOME=third-party/EWAHBoolArray
@@ -91,22 +56,6 @@
 
 LIB_TARGETS =
 
-ifneq ($(HAS_LUAJIT), 0)
-LIB_TARGETS += $(LUAJIT_LIB)
- endif
-
-ifneq ($(HAS_ZEROMQ), 0)
-LIB_TARGETS += $(ZEROMQ_LIB)
-endif
-
-ifneq ($(HAS_LIBRRDTOOL), 0)
-LIB_TARGETS += $(LIBRRDTOOL_LIB)
-endif
-
-ifneq ($(HAS_JSON), 0)
-LIB_TARGETS += $(JSON_LIB)
-endif
-
 .PHONY: default all clean docs test
 
 .NOTPARALLEL: default all
@@ -129,24 +78,6 @@
 $(TARGET): $(OBJECTS) $(LIBRRDTOOL) Makefile
 	$(GPP) $(OBJECTS) -Wall $(LIBS) -o $@
 
-$(NDPI_LIB): nDPI
-	cd nDPI; if test ! -f Makefile; then ./autogen.sh ; ./configure; fi; make
-
-nDPI:
-	svn co https://svn.ntop.org/svn/ntop/trunk/nDPI/
-
-$(LUAJIT_LIB):
-	cd $(LUAJIT_HOME); @GMAKE@
-
-$(ZEROMQ_LIB):
-	cd $(ZEROMQ_HOME); ./configure --without-documentation; @GMAKE@
-
-$(LIBRRDTOOL_LIB):
-	cd $(LIBRRDTOOL_HOME); ./configure --disable-rrd_graph --disable-libdbi --disable-libwrap --disable-rrdcgi --disable-libtool-lock --disable-nls --disable-rpath --disable-perl --disable-ruby --disable-lua --disable-tcl --disable-python --disable-dependency-tracking; cd src; @GMAKE@ librrd_th.la
-
-$(JSON_LIB):
-	cd $(JSON_HOME); ./autogen.sh; ./configure; @GMAKE@
-
 clean:
 	-rm -f *.o *~ svn-commit.* #config.h
 	-rm -f $(TARGET)
@@ -156,10 +87,6 @@
 	cat privkey.pem cert.pem > httpdocs/ssl/ntopng-cert.pem
 	/bin/rm -f privkey.pem cert.pem
 
-veryclean:
-	-rm -rf nDPI
-
-
 geoip: httpdocs/geoip/GeoLiteCity.dat httpdocs/geoip/GeoLiteCityv6.dat httpdocs/geoip/GeoIPASNum.dat httpdocs/geoip/GeoIPASNumv6.dat
 
 httpdocs/geoip/GeoLiteCity.dat:
@@ -189,7 +116,6 @@
 	cp -r doc *.cpp *.h configure COPYING README.* *.in ntopng.8 httpdocs scripts packages third-party ntopng-@NTOPNG_VERSION@
 	find ntopng-@NTOPNG_VERSION@ -name ".svn" | xargs /bin/rm -rf
 	-rm ntopng-@NTOPNG_VERSION@/httpdocs/geoip/*
-	cd ntopng-@NTOPNG_VERSION@; svn co https://svn.ntop.org/svn/ntop/trunk/nDPI/; cd ..
 	tar cvfz ntopng-@NTOPNG_VERSION@.tgz ntopng-@NTOPNG_VERSION@
 	#
 	rm -f $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(RPM_PKG)
@@ -232,21 +158,8 @@
 dist:
 	rm -rf ntopng-@NTOPNG_VERSION@
 	mkdir ntopng-@NTOPNG_VERSION@
-	cd ntopng-@NTOPNG_VERSION@; svn co https://svn.ntop.org/svn/ntop/trunk/ntopng/; cd ntopng; svn co https://svn.ntop.org/svn/ntop/trunk/nDPI/; cd ..; find ntopng -name .svn | xargs rm -rf ; mv ntopng ntopng-@NTOPNG_VERSION@; tar cvfz ../ntopng-@NTOPNG_VERSION@.tgz ntopng-@NTOPNG_VERSION@
 
 install: ntopng
-	@echo "Make sure you have already run 'make geoip' to also install geoip dat files"
-	@echo "While we provide you an install make target, we encourage you"
-	@echo "to create a package and install that"
-	@echo "rpm - do 'make build-rpm'"
-	@echo "deb - do 'cd packages/ubuntu;./configure;make"
-	mkdir -p $(INSTALL_DIR)/share/ntopng $(MAN_DIR)/man/man8 $(INSTALL_DIR)/bin
-	cp ntopng $(INSTALL_DIR)/bin
-	cp ./ntopng.8 $(MAN_DIR)/man/man8
-	cp -r ./httpdocs $(INSTALL_DIR)/share/ntopng
-	cp -r ./scripts $(INSTALL_DIR)/share/ntopng
-	find $(INSTALL_DIR)/share/ntopng -name "*~"   | xargs /bin/rm -f
-	find $(INSTALL_DIR)/share/ntopng -name ".svn" | xargs /bin/rm -rf
 
 uninstall:
 	if test -f $(INSTALL_DIR)/bin/ntopng; then rm $(INSTALL_DIR)/bin/ntopng; fi;