forked from vel21ripn/nDPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added target for shared liubrary creation
Added target for install Fixes ntop#593
- Loading branch information
Showing
8 changed files
with
57 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
ACLOCAL_AMFLAGS = -I m4 | ||
|
||
SUBDIRS = src/lib example tests | ||
|
||
pkgconfigdir = $(libdir)/pkgconfig | ||
pkgconfig_DATA = libndpi.pc | ||
|
||
EXTRA_DIST = libndpi.sym autogen.sh | ||
EXTRA_DIST = autogen.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# | ||
# Simple non-autotools dependent makefile | ||
# | ||
# ./autogen.sh | ||
# cd src/lib | ||
# make Makefile | ||
# | ||
|
||
# | ||
# Installation directories | ||
# | ||
prefix = /usr/local | ||
libdir = ${prefix}/lib | ||
includedir = ${prefix}/include/ndpi | ||
|
||
CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -g | ||
RANLIB = ranlib | ||
|
||
OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) ndpi_main.o | ||
HEADERS = $(wildcard ../include/*.h) | ||
NDPI_LIB_STATIC = libndpi.a | ||
NDPI_LIB_SHARED_BASE = libndpi.so | ||
NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE).@NDPI_VERSION_SHORT@ | ||
NDPI_LIBS = $(NDPI_LIB_STATIC) $(NDPI_LIB_SHARED) | ||
|
||
all: $(NDPI_LIBS) | ||
|
||
ndpi_main.c: ndpi_content_match.c.inc | ||
|
||
$(NDPI_LIB_STATIC): $(OBJECTS) | ||
ar rc $@ $(OBJECTS) | ||
$(RANLIB) $@ | ||
|
||
$(NDPI_LIB_SHARED): $(OBJECTS) | ||
gcc -shared -fPIC -o $@ $(OBJECTS) | ||
ln -Fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE) | ||
|
||
%.o: %.c $(HEADERS) Makefile | ||
$(CC) $(CFLAGS) -c $< -o $@ | ||
|
||
clean: | ||
/bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo | ||
|
||
install: $(NDPI_LIBS) | ||
mkdir -p $(DESTDIR)$(libdir) | ||
cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/ | ||
ln -Fs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE) | ||
mkdir -p $(DESTDIR)$(includedir) | ||
cp ../include/*.h $(DESTDIR)$(includedir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SSDP 19 1197 1 | ||
|
||
1 UDP 192.168.242.8:42253 -> 192.168.242.255:32412 [proto: 12/SSDP][cat: System/18][19 pkts/1197 bytes -> 0 pkts/0 bytes] |