-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (32 loc) · 841 Bytes
/
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
LIBSIMDIRS = zbase/libsim
LIBYUVDIRS = libyuv
INCLUDES = $(LIBSIMDIRS):$(LIBYUVDIRS)
LIBSIM = $(LIBSIMDIRS)/libsim.a
LIBYUV = $(LIBYUVDIRS)/libyuv.a
CC = gcc
CFLAGS = -c -O3
LIBS = -lm
TMPDIR = mk.tmp
BINSRCS = yuvmain.c
BINOBJS = $(BINSRCS:%.c=$(TMPDIR)/%.o)
OUTBIN = yuv
.PHONY: all
all : libyuv $(OUTBIN)
.PHONY: clean
clean:
@echo; echo "cleaning ..."
rm -rf $(TMPDIR)
rm -rf $(OUTBIN)
cd $(LIBYUVDIRS); make clean
$(OUTBIN): $(BINOBJS) $(LIBSIM) $(LIBYUV) | libyuv
@echo; echo "[LD] linking ..."
cc -I$(LIBSIMDIRS) -I$(LIBYUVDIRS) -o $@ $^
$(BINOBJS): $(LIBYUV) Makefile
$(BINOBJS): $(TMPDIR)/%.o:%.c | $(TMPDIR)
@echo; echo "[CC] compiling: $< "
$(CC) $(CFLAGS) -I$(LIBSIMDIRS) -I$(LIBYUVDIRS) -l$(LIBSIM) -l$(LIBYUV) -o $@ $<
.PHONY: libyuv
libyuv $(LIBYUV):
cd $(LIBYUVDIRS); make
$(TMPDIR):
mkdir $(TMPDIR)