summaryrefslogtreecommitdiffstats
path: root/nsock/examples/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'nsock/examples/Makefile')
-rw-r--r--nsock/examples/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/nsock/examples/Makefile b/nsock/examples/Makefile
new file mode 100644
index 0000000..de40593
--- /dev/null
+++ b/nsock/examples/Makefile
@@ -0,0 +1,29 @@
+CC = gcc
+CCOPT =
+DEFS =
+NBASEDIR=../../nbase
+NSOCKLIB=../src/libnsock.a
+NBASELIB=$(NBASEDIR)/libnbase.a
+OPENSSLLIB=-lssl -lpcap -lcrypto
+INCLS = -I../include -I$(NBASEDIR)
+CFLAGS = -I/usr/local/include -Wall -g $(CCOPT) $(DEFS) $(INCLS)
+LDFLAGS =
+PCAPBASEDIR=../../libpcap
+PCAPLIB=$(PCAPBASEDIR)/libpcap.a
+RM = rm -f
+
+TARGETS = nsock_test_timers nsock_telnet
+
+all: $(TARGETS)
+
+nsock_telnet: nsock_telnet.o $(NSOCKLIB)
+ $(CC) -o $@ $(CFLAGS) nsock_telnet.o $(NSOCKLIB) $(NBASELIB) $(OPENSSLLIB)
+
+nsock_test_timers: nsock_test_timers.o $(NSOCKLIB)
+ $(CC) -o $@ $(CFLAGS) nsock_test_timers.o $(NSOCKLIB) $(NBASELIB) $(OPENSSLLIB)
+
+nsock_pcap: nsock_pcap.o $(NSOCKLIB) $(PCAPLIB)
+ $(CC) -o $@ $(CFLAGS) nsock_pcap.o $(NSOCKLIB) $(NBASELIB) $(OPENSSLLIB) $(PCAPLIB)
+
+clean:
+ $(RM) *.o $(TARGETS)