comparison Makefile @ 7474:aa2274311ebb

some makefile cleanup
author arpi
date Sun, 22 Sep 2002 13:04:19 +0000
parents ad00ad5f25a9
children d08513b9fed6
comparison
equal deleted inserted replaced
7473:bd7a539178a3 7474:aa2274311ebb
28 28
29 SRCS_COMMON = cpudetect.c codec-cfg.c cfgparser.c my_profile.c spudec.c playtree.c playtreeparser.c asxparser.c vobsub.c subreader.c sub_cc.c find_sub.c 29 SRCS_COMMON = cpudetect.c codec-cfg.c cfgparser.c my_profile.c spudec.c playtree.c playtreeparser.c asxparser.c vobsub.c subreader.c sub_cc.c find_sub.c
30 SRCS_MENCODER = mencoder.c mp_msg-mencoder.c $(SRCS_COMMON) libao2/afmt.c divx4_vbr.c libvo/aclib.c libvo/osd.c libvo/sub.c libvo/font_load.c libvo/font_load_ft.c me-opt-reg.c xvid_vbr.c 30 SRCS_MENCODER = mencoder.c mp_msg-mencoder.c $(SRCS_COMMON) libao2/afmt.c divx4_vbr.c libvo/aclib.c libvo/osd.c libvo/sub.c libvo/font_load.c libvo/font_load_ft.c me-opt-reg.c xvid_vbr.c
31 SRCS_MPLAYER = mplayer.c mp_msg.c $(SRCS_COMMON) mixer.c mp-opt-reg.c 31 SRCS_MPLAYER = mplayer.c mp_msg.c $(SRCS_COMMON) mixer.c mp-opt-reg.c
32 32
33 ifeq ($(UNRARLIB),yes)
34 SRCS_COMMON += unrarlib.c
35 endif
36
33 OBJS_MENCODER = $(SRCS_MENCODER:.c=.o) 37 OBJS_MENCODER = $(SRCS_MENCODER:.c=.o)
34 OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o) 38 OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o)
35 39
36 VO_LIBS = libvo/libvo.a 40 VO_LIBS = libvo/libvo.a
37 VO_INC = -Ilibvo 41 VO_INC = -Ilibvo
45 ifeq ($(VIDIX),yes) 49 ifeq ($(VIDIX),yes)
46 MISC_LIBS += -Llibdha -ldha vidix/libvidix.a 50 MISC_LIBS += -Llibdha -ldha vidix/libvidix.a
47 endif 51 endif
48 CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader $(VO_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(FREETYPE_INC) $(SDL_INC) # -Wall 52 CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader $(VO_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(FREETYPE_INC) $(SDL_INC) # -Wall
49 53
50 PARTS = libfame libmpdemux libmpcodecs mp3lib liba52 libmpeg2 libavcodec libao2 drivers linux postproc input libmpdvdkit2 libvo 54 PARTS = libmpdemux libmpcodecs mp3lib liba52 libmpeg2 libavcodec libao2 drivers linux postproc input libvo
51 ifeq ($(VIDIX),yes) 55 ifeq ($(VIDIX),yes)
52 PARTS += libdha vidix 56 PARTS += libdha vidix
57 endif
58 ifeq ($(FAME),yes)
59 PARTS += libfame
60 endif
61 ifeq ($(DVDKIT2),yes)
62 PARTS += libmpdvdkit2
63 else
64 ifeq ($(DVDKIT),yes)
65 PARTS += libmpdvdkit
66 endif
53 endif 67 endif
54 ifeq ($(GUI),yes) 68 ifeq ($(GUI),yes)
55 PARTS += Gui 69 PARTS += Gui
56 endif 70 endif
57
58 ifeq ($(UNRARLIB),yes)
59 SRCS_COMMON += unrarlib.c
60 endif
61
62 ifneq ($(W32_LIB),) 71 ifneq ($(W32_LIB),)
63 PARTS += loader loader/dshow 72 PARTS += loader loader/dshow
64 endif 73 endif
74
75
65 LOADER_DEP = $(W32_DEP) $(DS_DEP) 76 LOADER_DEP = $(W32_DEP) $(DS_DEP)
66 LIB_LOADER = $(W32_LIB) $(DS_LIB) 77 LIB_LOADER = $(W32_LIB) $(DS_LIB)
67 78
68 ALL_PRG = $(PRG) 79 ALL_PRG = $(PRG)
69 ifeq ($(MENCODER),yes) 80 ifeq ($(MENCODER),yes)
71 endif 82 endif
72 ifeq ($(CSS_USE),yes) 83 ifeq ($(CSS_USE),yes)
73 ALL_PRG += $(PRG_FIBMAP) 84 ALL_PRG += $(PRG_FIBMAP)
74 endif 85 endif
75 86
76 .SUFFIXES: .cc .c .o 87 COMMON_DEPS = $(LOADER_DEP) $(MP1E_DEP) $(AV_DEP) libmpdemux/libmpdemux.a libmpcodecs/libmpcodecs.a libao2/libao2.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a linux/libosdep.a postproc/libpostproc.a input/libinput.a libvo/libvo.a
77
78 # .PHONY: all clean
79
80 all: $(ALL_PRG)
81
82 .c.o:
83 $(CC) -c $(CFLAGS) -o $@ $<
84
85 COMMON_DEPS = libmpdemux/libmpdemux.a libmpcodecs/libmpcodecs.a libao2/libao2.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a linux/libosdep.a postproc/libpostproc.a input/libinput.a libvo/libvo.a
86 88
87 ifeq ($(VIDIX),yes) 89 ifeq ($(VIDIX),yes)
88 COMMON_DEPS += libdha/libdha.so vidix/libvidix.a 90 COMMON_DEPS += libdha/libdha.so vidix/libvidix.a
89 endif 91 endif
90 ifeq ($(FAME),yes) 92 ifeq ($(FAME),yes)
96 else 98 else
97 COMMON_DEPS += libmpdvdkit2/libmpdvdkit.a 99 COMMON_DEPS += libmpdvdkit2/libmpdvdkit.a
98 endif 100 endif
99 endif 101 endif
100 102
103 ifeq ($(GUI),yes)
104 COMMON_DEPS += Gui/libgui.a
105 GUI_LIBS = Gui/libgui.a
106 endif
107
108
109 .SUFFIXES: .cc .c .o
110
111 # .PHONY: $(COMMON_DEPS)
112
113 all: $(ALL_PRG)
114
115 .c.o:
116 $(CC) -c $(CFLAGS) -o $@ $<
117
101 libmpdvdkit2/libmpdvdkit.a: 118 libmpdvdkit2/libmpdvdkit.a:
102 $(MAKE) -C libmpdvdkit2 119 $(MAKE) -C libmpdvdkit2
103 120
104 libmpdvdkit2/libmpdvdkit.so: 121 libmpdvdkit2/libmpdvdkit.so:
105 $(MAKE) -C libmpdvdkit2 libmpdvdkit.so 122 $(MAKE) -C libmpdvdkit2 libmpdvdkit.so
153 $(MAKE) -C postproc 170 $(MAKE) -C postproc
154 171
155 input/libinput.a: 172 input/libinput.a:
156 $(MAKE) -C input 173 $(MAKE) -C input
157 174
158 MPLAYER_DEP = $(OBJS_MPLAYER) $(LOADER_DEP) $(MP1E_DEP) $(AV_DEP) $(COMMON_DEPS) 175 MPLAYER_DEP = $(OBJS_MPLAYER) $(COMMON_DEPS)
159 MENCODER_DEP = $(OBJS_MENCODER) $(LOADER_DEP) $(MP1E_DEP) $(AV_DEP) $(COMMON_DEPS) 176 MENCODER_DEP = $(OBJS_MENCODER) $(COMMON_DEPS)
160
161 ifeq ($(GUI),yes)
162 MPLAYER_DEP += Gui/libgui.a
163 MENCODER_DEP += Gui/libgui.a
164 GUI_LIBS = Gui/libgui.a
165 endif
166 177
167 VIDIX_LIBS = 178 VIDIX_LIBS =
168 ifeq ($(VIDIX),yes) 179 ifeq ($(VIDIX),yes)
169 VIDIX_LIBS += vidix/libvidix.a 180 VIDIX_LIBS += vidix/libvidix.a
170 endif 181 endif