Statistics
| Branch: | Revision:

peerstreamer-src / Test / Makefile @ b87dc7a2

History | View | Annotate | Download (1.1 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
10
CFLAGS+=-L../Libs/GRAPES/src  -L../Libs/pstreamer/src 
11

    
12
all: $(LIBS) $(TARGET_SRC) $(TARGET_OBJS) $(OBJS)
13

    
14
Libs/mongoose/mongoose.o:
15
	git submodule init Libs/mongoose/
16
	git submodule update Libs/mongoose/
17
	$(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
18

    
19
Libs/GRAPES/src/libgrapes.a:
20
	git submodule init Libs/GRAPES/
21
	git submodule update Libs/GRAPES/
22
	make -C Libs/GRAPES/ 
23

    
24
Libs/pstreamer/src/libpstreamer.a:
25
	git submodule init Libs/pstreamer/
26
	git submodule update Libs/pstreamer/
27
	make -C Libs/pstreamer/ 
28

    
29
%.test: %.c $(TARGET_OBJS) 
30
	$(CC) -o $@ $< $(CFLAGS) $(TARGET_OBJS) $(LIBS) $(LDFLAGS)
31

    
32
clean:
33
	rm -f *.test
34

    
35
.PHONY: all clean
36