comparison Makefile @ 1395:a721a2b91d3d

Added StrongARM crosscompiling support by Maksim Krasnyanskiy <maxk at qualcomm.com> and fixed a --datadir bug in configure.
author atmos4
date Sat, 28 Jul 2001 05:36:45 +0000
parents d1fb303707d3
children 8ecf18884ad8
comparison
equal deleted inserted replaced
1394:d9e3f91d6da9 1395:a721a2b91d3d
20 OBJS = $(SRCS:.c=.o) 20 OBJS = $(SRCS:.c=.o)
21 CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) # -Wall 21 CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) # -Wall
22 A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3 $(ALSA_LIB) $(ESD_LIB) 22 A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3 $(ALSA_LIB) $(ESD_LIB)
23 VO_LIBS = -Llibvo -lvo $(X_LIBS) 23 VO_LIBS = -Llibvo -lvo $(X_LIBS)
24 24
25 PARTS = mp3lib libac3 libmpeg2 opendivx libavcodec encore libvo libao2 drivers drivers/syncfb
26
25 ifeq ($(TARGET_ARCH_X86),yes) 27 ifeq ($(TARGET_ARCH_X86),yes)
28 PARTS += loader loader/DirectShow
26 SRCS += dll_init.c 29 SRCS += dll_init.c
27 LOADER_DEP = loader/libloader.a $(DS_DEP) 30 LOADER_DEP = loader/libloader.a $(DS_DEP)
28 LIB_LOADER = -Lloader -lloader $(DS_LIB) 31 LIB_LOADER = -Lloader -lloader $(DS_LIB)
29 else 32 else
30 LOADER_DEP = 33 LOADER_DEP =
40 # $(PRG_AVIP) 43 # $(PRG_AVIP)
41 44
42 .c.o: 45 .c.o:
43 $(CC) -c $(CFLAGS) -o $@ $< 46 $(CC) -c $(CFLAGS) -o $@ $<
44 47
45 COMMONLIBS = libvo/libvo.a libao2/libao2.a libac3/libac3.a mp3lib/libMP3.a 48 COMMONLIBS = libvo/libvo.a libao2/libao2.a libac3/libac3.a mp3lib/libMP3.a libmpeg2/libmpeg2.a opendivx/libdecore.a encore/libencore.a
46 49
47 loader/libloader.a: 50 loader/libloader.a:
48 $(MAKE) -C loader 51 $(MAKE) -C loader
49 52
50 loader/DirectShow/libDS_Filter.a: 53 loader/DirectShow/libDS_Filter.a:
73 76
74 encore/libencore.a: 77 encore/libencore.a:
75 $(MAKE) -C encore 78 $(MAKE) -C encore
76 79
77 80
78 MPLAYER_DEP = mplayer.o $(OBJS) $(LOADER_DEP) $(AV_DEP) libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a 81 MPLAYER_DEP = mplayer.o $(OBJS) $(LOADER_DEP) $(AV_DEP) $(COMMONLIBS)
79
80 mplayerwithoutlink: $(MPLAYER_DEP) 82 mplayerwithoutlink: $(MPLAYER_DEP)
81 @for a in mp3lib libac3 libmpeg2 libvo opendivx libavcodec encore loader/DirectShow ; do $(MAKE) -C $$a all ; done 83 @for a in $(PARTS); do $(MAKE) -C $$a all ; done
82 84
83 $(PRG): $(MPLAYER_DEP) 85 $(PRG): $(MPLAYER_DEP)
84 $(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(VO_LIBS) $(CSS_LIB) -Lencore -lencore $(DECORE_LIBS) $(ARCH_LIBS) 86 $(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(VO_LIBS) $(CSS_LIB) -Lencore -lencore $(DECORE_LIBS) $(ARCH_LIBS)
85 87
86 $(PRG_FIBMAP): fibmap_mplayer.o 88 $(PRG_FIBMAP): fibmap_mplayer.o
100 # run. This is necessary, because the make rule for version.h removes objects 102 # run. This is necessary, because the make rule for version.h removes objects
101 # in a recursive "make distclean" and we must wait for this "make distclean" to 103 # in a recursive "make distclean" and we must wait for this "make distclean" to
102 # finish before be can start builing new object files. 104 # finish before be can start builing new object files.
103 $(MPLAYER_DEP): version.h 105 $(MPLAYER_DEP): version.h
104 106
105 $(PRG_CFG): version.h codec-cfg.c codec-cfg.h 107 $(PRG_CFG): version.h codec-cfg.c codec-cfg.h
106 $(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML 108 $(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML
107 109
108 install: $(PRG) $(PRG_FIBMAP) 110 install: $(PRG) $(PRG_FIBMAP)
109 install -d $(BINDIR) 111 install -d $(BINDIR)
110 install -m 755 -s $(PRG) $(BINDIR)/$(PRG) 112 install -m 755 -s $(PRG) $(BINDIR)/$(PRG)
118 120
119 clean: 121 clean:
120 rm -f *.o *~ $(OBJS) 122 rm -f *.o *~ $(OBJS)
121 123
122 distclean: 124 distclean:
123 @for a in mp3lib libac3 libmpeg2 opendivx libavcodec encore libvo libao2 loader loader/DirectShow drivers drivers/syncfb ; do \
124 if [ -d $$a ] ; then \
125 $(MAKE) -C $$a distclean ; \
126 fi; \
127 done
128 rm -f *~ $(PRG) $(PRG_FIBMAP) $(PRG_HQ) $(PRG_AVIP) $(PRG_TV) $(OBJS) *.o *.a .depend 125 rm -f *~ $(PRG) $(PRG_FIBMAP) $(PRG_HQ) $(PRG_AVIP) $(PRG_TV) $(OBJS) *.o *.a .depend
126 @for a in $(PARTS); do $(MAKE) -C $$a distclean; done
129 127
130 dep: depend 128 dep: depend
131 129
132 depend: 130 depend:
133 ./version.sh 131 ./version.sh
134 $(CC) -MM $(CFLAGS) mplayer.c $(SRCS) 1>.depend 132 $(CC) -MM $(CFLAGS) mplayer.c $(SRCS) 1>.depend
135 @for a in mp3lib libac3 libmpeg2 libvo libao2 opendivx libavcodec encore loader/DirectShow ; do \ 133 @for a in $(PARTS); do $(MAKE) -C $$a dep; done
136 if [ -d $$a ] ; then \
137 $(MAKE) -C $$a dep ; \
138 fi ; \
139 done
140 134
141 # ./configure must be run if it changed in CVS 135 # ./configure must be run if it changed in CVS
142 config.h: configure 136 config.h: configure
143 @echo "############################################################" 137 @echo "############################################################"
144 @echo "####### Please run ./configure again - it's changed! #######" 138 @echo "####### Please run ./configure again - it's changed! #######"
160 # include dependency files if they exist 154 # include dependency files if they exist
161 # 155 #
162 ifneq ($(wildcard .depend),) 156 ifneq ($(wildcard .depend),)
163 include .depend 157 include .depend
164 endif 158 endif
165
166