Revision ecf6e64a

View differences:

Makefile
1
CFLAGS = -Wall
2
CFLAGS += -Wdeclaration-after-statement
3
CFLAGS += -Wno-switch -Wpointer-arith -Wredundant-decls
4
CFLAGS += -Wno-pointer-sign 
5
CFLAGS += -g
1
include utils.mak
2

  
3
CFLAGS = -g -Wall
4
CFLAGS += $(call cc-option, -Wdeclaration-after-statement)
5
CFLAGS += $(call cc-option, -Wno-switch)
6
CFLAGS += $(call cc-option, -Wdisabled-optimization)
7
CFLAGS += $(call cc-option, -Wpointer-arith)
8
CFLAGS += $(call cc-option, -Wredundant-decls)
9
CFLAGS += $(call cc-option, -Wno-pointer-sign)
10
CFLAGS += $(call cc-option, -Wcast-qual)
11
CFLAGS += $(call cc-option, -Wwrite-strings)
12
CFLAGS += $(call cc-option, -Wtype-limits)
13
CFLAGS += $(call cc-option, -Wundef)
14

  
15
CFLAGS += $(call cc-option, -funit-at-a-time)
16

  
6 17
GRAPES ?= GRAPES
7 18

  
8 19
CPPFLAGS = -I$(GRAPES)/include
......
29 40
OBJS += Chunkiser/input-avs.o
30 41
LDFLAGS += -L$(FFDIR)/libavcodec -L$(FFDIR)/libavformat -L$(FFDIR)/libavutil
31 42
LDLIBS += -lavformat -lavcodec -lavutil
32
LDLIBS += -lz -lm	#FIXME!
43
LDLIBS += -lm
44
LDLIBS += $(call ld-option, -lz)
45
LDLIBS += $(call ld-option, -lbz2)
33 46
else
34 47
OBJS += input-dummy.o
35 48
endif
utils.mak
1
cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
2
              > /dev/null 2>&1; then echo "$(1)"; fi ;)
3

  
4
ld-option = $(shell if echo "int main(){return 0;}" | \
5
		$(CC) $(CFLAGS) $(1) -o /dev/null -xc - \
6
		> /dev/null 2>&1; then echo "$(1)"; fi ;)

Also available in: Unified diff