aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1b79565
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+CC=gcc
+CFLAGS=-I. -static
+SRCS=src/main.c src/login.c src/server.c src/data.c
+BIN=cmud
+
+%.o: %.c
+ $(CC) -c -o $@ $< $(CFLAGS)
+
+dev: $(SRCS)
+ $(CC) -o $(BIN)-devel $(SRCS) $(LFLAGS) -g
+
+main: $(SRCS)
+ $(CC) -o $(BIN) $(SRCS) $(LFLAGS) $(CFLAGS)
+
+dist: main
+ tar czvf $(BIN).tar.gz $(BIN)
+
+clean:
+ rm $(BIN)*
+
+run: dev
+ ./cmud-devel