summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormikeos <mike.osipov@gmail.com>2012-10-13 23:20:14 +0400
committermikeos <mike.osipov@gmail.com>2012-10-13 23:20:14 +0400
commit893c216b889f260378fb21a7f576c061f7ff2248 (patch)
treead4566df268c76de8fc743d006b14baf6bfb6594 /Makefile
initial
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.*