File: Makefile

package info (click to toggle)
effectv 0.3.11-1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 748 kB
  • ctags: 1,316
  • sloc: ansic: 12,575; makefile: 216; perl: 38
file content (55 lines) | stat: -rw-r--r-- 1,184 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Makefile for EffecTV

include ./config.mk

CC = gcc
NASM = nasm
INSTALL = /usr/bin/install -c

CFLAGS = $(CONFIG) $(CONFIG.arch) $(CFLAGS.opt) -Iv4lutils `sdl-config --cflags`
LIBS = v4lutils/libv4lutils.a -lm `sdl-config --libs` $(LIBS.extra)

PROGRAM = effectv

COREOBJS = main.o screen.o video.o frequencies.o palette.o
VLOOPBACKOBJS = vloopback.o
UTILS = utils.o yuv.o buffer.o image.o

OBJS = $(COREOBJS) $(UTILS)

ifeq ($(USE_VLOOPBACK), yes)
OBJS += $(VLOOPBACKOBJS)
endif

LIBEFFECTS = effects/libeffects.a
SUBDIRS = effects v4lutils tools

### rules

%.o: %.c
	$(CC) $(CFLAGS) -Wall -c -o $@ $<
%.o: %.nas
	$(NASM) -f elf $<

all-recursive:
	@list='$(SUBDIRS)'; for subdir in $$list; do \
	(cd $$subdir && $(MAKE) all-recursive) || exit 1;\
	done; \
	$(MAKE) all-am

all-am: $(PROGRAM)

$(PROGRAM): $(OBJS) $(LIBEFFECTS) v4lutils/libv4lutils.a
	$(CC) -o $@ $(OBJS) $(LIBEFFECTS) $(LIBS)

$(OBJS): EffecTV.h screen.h video.h palette.h frequencies.h vloopback.h utils.h

install: all-am
	$(INSTALL) $(PROGRAM) $(bindir)/
	$(INSTALL) effectv.1 $(mandir)/man1/

clean:
	rm -f *.o $(PROGRAM)
	cd effects && $(MAKE) clean
	cd v4lutils && $(MAKE) clean
	cd tools && $(MAKE) clean