forked from google/spatial-media
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
38 lines (27 loc) · 904 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
appname := spatialmedia
CXX := g++
CCFLAGS := -ggdb3 -O3
CFLAGS := -I. -I./mpeg -I./third_party/mxml-2.10
CXXFLAGS := -ggdb3 -O0 -I./third_party/mxml-2.10
LDFLAGS += ./third_party/mxml-2.10/libmxml.a ./mpeg/libspatialmedia.a -lpthread
# LIBS := -lmxml
srcfiles := $(shell ls -1 *.cpp)
objects := $(patsubst %.cpp, %.o, $(srcfiles))
all: mxml MPEG $(appname)
MPEG:
if [ ! -e ./mpeg/libspatialmedia.a ]; then cd mpeg; make; cd ..; fi
mxml:
if [ ! -e ./third_party/mxml-2.10/libmxml.so.1.5 ]; then cd third_party/mxml-2.10; ./configure; make; cd ../../; fi
$(appname): $(objects)
$(CXX) $(CXXFLAGS) -o $(appname) $(objects) $(LDLIBS) $(LDFLAGS)
depend: .depend
.depend: $(srcfiles)
rm -f ./.depend
$(CXX) $(CXXFLAGS) -MM $^>>./.depend;
clean:
rm -f $(objects) $(appname)
cd ./mpeg; make clean
cd ./third_party/mxml-2.10; make clean
dist-clean: clean
rm -f *~ .depend
include .depend