Makefile 905 Bytes
Newer Older
1 2 3

include ../config.mak

4
SWSLIB = libswscale.a
5

6 7
SWSSRCS=swscale.c rgb2rgb.c yuv2rgb.c
SWSOBJS=$(SWSSRCS:.c=.o)
8

9
CFLAGS  = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
10 11 12 13 14 15 16
# -I/usr/X11R6/include/

.SUFFIXES: .c .o

# .PHONY: all clean

.c.o:
17
	$(CC) -c $(CFLAGS) -I.. -o $@ $<
18

19
all:    $(SWSLIB)
20

21 22
$(SWSLIB):     $(SWSOBJS)
	$(AR) r $(SWSLIB) $(SWSOBJS)
23 24

clean:
25
	rm -f *.o *.a *~ *.so cs_test swscale-example
26 27

distclean:
28
	rm -f Makefile.bak *.o *.a *~ *.so .depend cs_test swscale-example
29 30 31 32

dep:    depend

depend:
33
	$(CC) -MM $(CFLAGS) $(SWSSRCS) 1>.depend
34

35 36
cs_test: cs_test.o $(SWSLIB)
	$(CC) cs_test.o $(SWSLIB) ../cpudetect.o -DFOR_MENCODER ../mp_msg.c -o cs_test -W -Wall
37

38
swscale-example: swscale-example.o $(SWSLIB)
39
	$(CC) swscale-example.o $(SWSLIB) ../libmpcodecs/img_format.o -lm -o swscale-example -W -Wall
40 41 42 43 44 45
#
# include dependency files if they exist
#
ifneq ($(wildcard .depend),)
include .depend
endif