-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
55 lines (39 loc) · 1.16 KB
/
Makefile
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) -s $(PROGRAM) $(bindir)/
$(INSTALL) effectv.1 $(mandir)/man1/
clean:
rm -f *.o $(PROGRAM)
cd effects && $(MAKE) clean
cd v4lutils && $(MAKE) clean
cd tools && $(MAKE) clean