comparison libswscale/Makefile @ 18989:f0e9de2b3780

make libswscale build system similar to the libav* one
author lucabe
date Mon, 10 Jul 2006 12:35:52 +0000
parents 8579acff875e
children 0e37275ccbe5
comparison
equal deleted inserted replaced
18988:a61ef37d3c71 18989:f0e9de2b3780
1 1
2 include ../config.mak 2 include ../config.mak
3 3
4 SWSLIB = libswscale.a 4 NAME=swscale
5 5 ifeq ($(BUILD_SHARED),yes)
6 SWSSRCS=swscale.c rgb2rgb.c yuv2rgb.c 6 LIBVERSION=$(SWSVERSION)
7 7 LIBMAJOR=$(SWSMAJOR)
8 SWSOBJS=$(SWSSRCS:.c=.o)
9
10 ifeq ($(TARGET_ALTIVEC),yes)
11 SWSOBJS += yuv2rgb_altivec.o
12 endif 8 endif
13 9
14 CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC) 10 # NOTE: -I.. is needed to include config.h
15 # -I/usr/X11R6/include/ 11 CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil \
12 -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
13 -D_GNU_SOURCE
16 14
17 .SUFFIXES: .c .o 15 OBJS= swscale.o rgb2rgb.o yuv2rgb.o
18 16 ifeq ($(TARGET_ALTIVEC),yes)
19 # .PHONY: all clean 17 OBJS+= yuv2rgb_altivec.o
20
21 .c.o:
22 $(CC) -c $(CFLAGS) -I.. -o $@ $<
23
24 all: $(SWSLIB)
25
26 $(SWSLIB): $(SWSOBJS)
27 $(AR) r $(SWSLIB) $(SWSOBJS)
28 $(RANLIB) $(SWSLIB)
29
30 clean:
31 rm -f *.o *.a *~ *.so cs_test swscale-example
32
33 distclean: clean
34 rm -f .depend
35
36 dep: depend
37
38 depend:
39 $(CC) -MM $(CFLAGS) $(SWSSRCS) 1>.depend
40
41 cs_test: cs_test.o $(SWSLIB)
42 $(CC) cs_test.o $(SWSLIB) ../cpudetect.o -DFOR_MENCODER ../mp_msg.c -o cs_test -W -Wall
43
44 swscale-example: swscale-example.o $(SWSLIB)
45 $(CC) swscale-example.o $(SWSLIB) ../libmpcodecs/img_format.o -lm -o swscale-example -W -Wall
46 #
47 # include dependency files if they exist
48 #
49 ifneq ($(wildcard .depend),)
50 include .depend
51 endif 18 endif
52 19
20 HEADERS = swscale.h rgb2rgb.h
21
22 include $(SRC_PATH)/common.mak