aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-01-20 23:47:53 -0500
committerCara Salter <cara@devcara.com>2022-01-20 23:47:53 -0500
commitc2352ee043546b518f69c615a1ece778e942e650 (patch)
tree6efe18199f0fe2810c879c9251db2897a3244604 /Makefile
downloadcmud-c2352ee043546b518f69c615a1ece778e942e650.tar.gz
cmud-c2352ee043546b518f69c615a1ece778e942e650.zip
initial commit
yay start of a state machine and also learning sockets
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