Debian Codegraph @

src/Makefile

raw symbols ◀ ▶
Source reconstructed at patch state 1 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 ifneq ($(shell which xxd),)
2 LOGODEP=logo.c seek.c
3 else
4 LOGODEP=logo.o seek.o
5 endif
6
7 include ../common.mak
8
9 CONFIGTEMP=conf.out
10
11 ifeq ($(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --exists libavcodec libavformat libavutil libswscale || echo no), no)
12 $(error "http://ffmpeg.org is required - install libavcodec-dev, libswscale-dev, etc")
13 endif
14
15 ifeq ($(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --exists libpng || echo no), no)
16 $(error "libpng is required - install libpng-dev")
17 endif
18
19 FLAGS=-I../libharvid/
20 FLAGS+=$(ARCHINCLUDES) $(ARCHFLAGS)
21 FLAGS+=`pkg-config --cflags libavcodec libavformat libavutil libpng libswscale`
22
23 LOADLIBES=$(ARCHLIBES)
24 LOADLIBES+=`pkg-config --libs libavcodec libavformat libavutil libpng libswscale`
25 LOADLIBES+=-ljpeg
26 LOADLIBES+=-lz -lm
27
28 FLAGS+=-DICSVERSION="\"$(VERSION)\"" -DICSARCH="\"$(UNAME)\""
29
30 all: harvid
31
32 HARVID_H = \
33 daemon_log.h daemon_util.h \
34 socket_server.h \
35 enums.h \
36 favicon.h \
37 ics_handler.h httprotocol.h htmlconst.h \
38 image_format.h \
39 ../libharvid/vinfo.h \
40 ../libharvid/frame_cache.h \
41 ../libharvid/image_cache.h\
42 ../libharvid/ffdecoder.h \
43 ../libharvid/decoder_ctrl.h \
44 ../libharvid/ffcompat.h \
45 ../libharvid/timecode.h
46
47 HARVID_SRC = \
48 harvid.c \
49 daemon_log.c daemon_util.c \
50 fileindex.c htmlseek.c \
51 httprotocol.c ics_handler.c \
52 image_format.c \
53 socket_server.c \
54 ../libharvid/libharvid.a
55
56 ifneq ($(shell which xxd),)
57 FLAGS+=-DXXDI
58
59 logo.c: ../doc/harvid.jpg
60 xxd -i ../doc/harvid.jpg > logo.c
61
62 seek.c: ../doc/seek.js
63 xxd -i ../doc/seek.js > seek.c
64
65 logo.o: ../doc/harvid.jpg
66 xxd -i ../doc/harvid.jpg | $(CC) -x c - -c -o logo.o
67
68 seek.o: ../doc/seek.js
69 xxd -i ../doc/seek.js | $(CC) -x c - -c -o seek.o
70
71 else
72
73 logo.o: ../doc/harvid.jpg
74 $(LD) -r -b binary -o logo.o ../doc/harvid.jpg
75
76 seek.o: ../doc/seek.js
77 $(LD) -r -b binary -o seek.o ../doc/seek.js
78
79 endif
80
81 harvid: $(HARVID_SRC) $(HARVID_H) $(LOGODEP)
82 export PKG_CONFIG_PATH=$(PKG_CONFIG_PATH);\
83 $(CC) -o $(@) $(CFLAGS) $(FLAGS) $(HARVID_SRC) $(LOGODEP) $(LDFLAGS) $(LOADLIBES)
84
85 clean:
86 rm -f harvid logo.c logo.o seek.c seek.o cscope.* tags
87
88 man: harvid
89 help2man -N -n 'video server' -o ../doc/harvid.1 ./harvid
90
91 install: install-bin
92
93 uninstall: uninstall-bin
94
95 install-bin: harvid
96 install -d $(DESTDIR)$(bindir)
97 install -m755 harvid $(DESTDIR)$(bindir)
98
99 uninstall-bin:
100 rm -f $(DESTDIR)$(bindir)/harvid
101 -rmdir $(DESTDIR)$(bindir)
102
103 install-man:
104
105 uninstall-man:
106
107 install-lib:
108
109 uninstall-lib:
110
111 .PHONY: all install uninstall install-man uninstall-man install-bin uninstall-bin install-lib uninstall-lib