PageRenderTime 24ms CodeModel.GetById 17ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/H264Dec/Makefile

http://github.com/mbebenita/Broadway
Makefile | 84 lines | 65 code | 13 blank | 6 comment | 0 complexity | 1bfc21526676d8d833b65a89999077de MD5 | raw file
 1OPTS = -m32 -O3 -g # -DH264DEC_TRACE -D_ERROR_PRINT -D_DEBUG_PRINT -D_ASSERT_USED	
 2ifeq ($(LINUX),1)
 3OPTS += -DLINUX
 4endif
 5
 6LDFLAGS = -m32
 7
 8# Project name
 9PROJECT = avc
10
11# Directories
12OBJDIR = obj
13SRCDIR = source
14INCDIR = inc
15
16# Libraries
17ifeq ($(LINUX),1)
18LIBS = -lSDL
19else
20LIBS =  -framework Cocoa -framework SDL
21endif
22
23# Files and folders
24# SRCS    = $(shell find $(SRCDIR) -name '*.c')
25SRCS := \
26    source/h264bsd_transform.c \
27    source/h264bsd_util.c \
28    source/h264bsd_byte_stream.c \
29    source/h264bsd_seq_param_set.c \
30    source/h264bsd_pic_param_set.c \
31    source/h264bsd_slice_header.c \
32    source/h264bsd_slice_data.c \
33    source/h264bsd_macroblock_layer.c \
34    source/h264bsd_stream.c \
35    source/h264bsd_vlc.c \
36    source/h264bsd_cavlc.c \
37    source/h264bsd_nal_unit.c \
38    source/h264bsd_neighbour.c \
39    source/h264bsd_storage.c \
40    source/h264bsd_slice_group_map.c \
41    source/h264bsd_intra_prediction.c \
42    source/h264bsd_inter_prediction.c \
43    source/h264bsd_reconstruct.c \
44    source/h264bsd_dpb.c \
45    source/h264bsd_image.c \
46    source/h264bsd_deblocking.c \
47    source/h264bsd_conceal.c \
48    source/h264bsd_vui.c \
49    source/h264bsd_pic_order_cnt.c \
50    source/h264bsd_decoder.c \
51    source/H264SwDecApi.c \
52    source/Broadway.c
53    
54OBJS    = $(patsubst $(SRCDIR)/%.c,$(OBJDIR)/%.o,$(SRCS))
55
56# Targets
57ifeq ($(LINUX),1)
58$(PROJECT): build-dirs $(OBJS)
59	$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
60
61$(OBJDIR)/SDLMain.o: SDLMain.m
62	$(CC) $(OPTS) -c $< -o $@
63else
64$(PROJECT): build-dirs $(OBJS) $(OBJDIR)/SDLMain.o
65	$(CC) $(LDFLAGS) $(OBJS) $(OBJDIR)/SDLMain.o $(LIBS) -o $@
66
67$(OBJDIR)/SDLMain.o: SDLMain.m
68	$(CC) $(OPTS) -c $< -o $@
69endif
70
71$(OBJDIR)/%.o: $(SRCDIR)/%.c
72	$(CC) $(OPTS) -c -I$(INCDIR) $< -o $@
73
74build-dirs:
75	@$(call make-dirs)
76
77clean:
78	rm -Rf $(OBJDIR)
79	rm $(PROJECT)
80	rm -Rf js
81
82define make-dirs
83	mkdir -p $(OBJDIR)
84endef