summaryrefslogtreecommitdiff
path: root/Makefile
blob: 3af6ebc66864343d98a4c97fcf12cd1a0144e131 (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 gstreamer-video-1.0 json-glib-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