Statistics
| Branch: | Revision:

peerstreamer-src / Test / Makefile @ c81c126e

History | View | Annotate | Download (1.24 KB)

1
SRC=$(wildcard *.c)
2
OBJS=$(SRC:.c=.test)
3

    
4
TARGET_SRC += $(wildcard ../src/*.c) 
5
TARGET_OBJS=$(TARGET_SRC:.c=.o)
6

    
7
LIBS+=../Libs/mongoose/mongoose.o ../Libs/GRAPES/src/libgrapes.a ../Libs/pstreamer/src/libpstreamer.a
8
LDFLAGS+=-lpstreamer -lgrapes -lm
9
CFLAGS += -g -W -Wall -Wno-unused-function -Wno-unused-parameter -O0 -I../Libs/mongoose/  -I../src -I../Libs/pstreamer/include -I../Libs/GRAPES/include
10
CFLAGS+=-L../Libs/GRAPES/src  -L../Libs/pstreamer/src 
11

    
12
all: $(LIBS) $(TARGET_SRC) $(TARGET_OBJS) $(OBJS) ../Tools/janus
13

    
14
../Tools/janus:
15
	make -C ../ Tools/janus
16

    
17
Libs/mongoose/mongoose.o:
18
	git submodule init Libs/mongoose/
19
	git submodule update Libs/mongoose/
20
	$(CC) -c -o ../Libs/mongoose/mongoose.o ../Libs/mongoose/mongoose.c $(CFLAGS) -DMG_DISABLE_MQTT -DMG_DISABLE_JSON_RPC -DMG_DISABLE_SOCKETPAIR  -DMG_DISABLE_CGI # -DMG_DISABLE_HTTP_WEBSOCKET
21

    
22
../Libs/GRAPES/src/libgrapes.a:
23
	git submodule init ../Libs/GRAPES/
24
	git submodule update ../Libs/GRAPES/
25
	make -C ../Libs/GRAPES/ 
26

    
27
../Libs/pstreamer/src/libpstreamer.a:
28
	git submodule init ../Libs/pstreamer/
29
	git submodule update ../Libs/pstreamer/
30
	make -C ../Libs/pstreamer/ 
31

    
32
%.test: %.c $(TARGET_OBJS) 
33
	$(CC) -o $@ $< $(CFLAGS) $(TARGET_OBJS) $(LIBS) $(LDFLAGS)
34

    
35
clean:
36
	rm -f *.test $(LIBS)
37

    
38
.PHONY: all clean
39