summaryrefslogtreecommitdiff
path: root/Makefile
blob: fde12d0939b8207b22b2447c204d2677b1e4958a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
DEBUG_CFLAGS	:= -O0 -ggdb -Wall -fsanitize=address -fno-omit-frame-pointer -DENCODE_DEBUG -DPLAY_DEBUG -DHEADERS_DEBUG
CFLAGS		:= -O0 -ggdb -Wall -fno-omit-frame-pointer -DENCODE_DEBUG
#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