-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
32 lines (25 loc) · 763 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
SRC = $(wildcard *.c)
OBJ = $(SRC:.c=.o)
ALL_LIBS= libavformat \
libavcodec \
libswresample \
libavutil \
libcurl \
json-c \
ao \
libcrypto \
CFLAGS += -Wall
LIBS = -lpthread
CFLAGS := $(shell pkg-config --cflags $(ALL_LIBS)) $(CFLAGS)
LIBS := $(shell pkg-config --libs $(ALL_LIBS)) $(LIBS)
all: rpd
debug: CFLAGS += -g
debug: rpd
release: CFLAGS += -O2
release: rpd
rpd: ${OBJ}
gcc ${CFLAGS} -o $@ $^ ${LIBS}
%.o: %.c
gcc ${CFLAGS} -c $<
clean:
-rm *.o