summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b7738ce
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+PROG = $(shell pwd | xargs basename)
+OBJECTS = main.o buffer.o xwrap.o
+CFLAGS = -O2 -Wall -D_GNU_SOURCE -DNDEBUG -DNOCOLOR -DPROGNAME=\"$(PROG)\"
+
+all: $(PROG) tcpstat
+
+$(PROG): $(OBJECTS)
+ gcc -s -o $@ $(OBJECTS)
+
+tcpstat: tcpstat.o
+ gcc -s -o $@ $<
+
+%.o: %.c
+ gcc $(CFLAGS) -c -o $@ $<
+
+clean:
+ @echo cleaning...
+ @rm -f *.o *~ core.*