summaryrefslogtreecommitdiff
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..f87b792
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+DEBUG_CFLAGS := -O0 -ggdb -Wall -fsanitize=address -fno-omit-frame-pointer
+CFLAGS := -O3 -march=native -Wall
+PKGCONFIG := pkg-config
+LIBS := $(shell $(PKGCONFIG) --libs --cflags glib-2.0 gio-unix-2.0 libsoup-2.4 gstreamer-pbutils-1.0) -lrt
+
+SERVER_NAME := stp-server
+SRC_OBJS := $(addprefix src/,debug/local-play.o lib.o encode.o)
+
+VPATH := debug
+
+%.o: %.c %.h
+ $(CC) -c $(CFLAGS) $(LIBS) $< -o $@
+
+$(SERVER_NAME): src/main.c $(SRC_OBJS)
+ $(CC) $(CFLAGS) $(LIBS) $^ -o $@
+
+all: sst-server
+
+clean:
+ rm -f $(SRC_OBJS) $(SERVER_NAME) src/*.webm