updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / mjpg-streamer-uvc / Makefile
blobd0eb420da105fab7b58a75262fac611979ac14bf
1 ###############################################################
3 # Purpose: Makefile for "M-JPEG Streamer"
4 # Author.: Tom Stoeveken (TST)
5 # Version: 0.3
6 # License: GPL
8 ###############################################################
10 CC = gcc
12 CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall
13 #CFLAGS += -O2 -DDEBUG -DLINUX -D_GNU_SOURCE -Wall
14 LFLAGS += -lpthread -ldl
16 APP_BINARY=mjpg_streamer
17 OBJECTS=mjpg_streamer.o utils.o
19 all: application plugins
21 clean:
22 make -C plugins/input_uvc $@
23 make -C plugins/output_file $@
24 make -C plugins/output_http $@
25 rm -f *.a *.o $(APP_BINARY) core *~ *.so *.lo
27 plugins: input_uvc.so output_file.so output_http.so
29 application: $(APP_BINARY)
31 input_uvc.so: mjpg_streamer.h utils.h
32 make -C plugins/input_uvc all
33 cp plugins/input_uvc/input_uvc.so .
35 output_file.so: mjpg_streamer.h utils.h
36 make -C plugins/output_file all
37 cp plugins/output_file/output_file.so .
39 output_http.so: mjpg_streamer.h utils.h
40 make -C plugins/output_http all
41 cp plugins/output_http/output_http.so .
43 $(APP_BINARY): mjpg_streamer.c mjpg_streamer.h mjpg_streamer.o utils.c utils.h utils.o
44 $(CC) $(CFLAGS) $(LFLAGS) $(OBJECTS) -o $(APP_BINARY)
45 chmod 755 $(APP_BINARY)
47 # useful to make a backup "make tgz"
48 tgz: clean
49 mkdir -p backups
50 tar czvf ./backups/mjpg_streamer_`date +"%Y_%m_%d_%H.%M.%S"`.tgz --exclude backups *