aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4f6a822
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+CC=gcc
+CFLAGS=-std=c99 -Wall -Werror -O2 -march=native $(shell pkg-config --cflags SDL2_mixer)
+LDFLAGS=$(shell pkg-config --libs SDL2_mixer)
+
+
+SRC=$(wildcard src/*.c)
+OBJ=$(SRC:.c=.o)
+
+LIBS=$(wildcard $(LIB)/*.c)
+
+BIN=audio
+
+$(BIN): $(OBJ)
+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
+
+*.o: *.c
+ $(CC) -o $@ -c $< $(CFLAGS)
+
+clean:
+ $(RM) -r obj/* src/*.o $(BIN)