-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (33 loc) · 746 Bytes
/
Makefile
File metadata and controls
47 lines (33 loc) · 746 Bytes
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
all: test lib
lib: $(MOPA_LIB)
MOPA_LIB=obj/mopa.a
CXXFLAGS=-fPIC -g -O0
MOPA_LIB_SOURCES= \
src/commontypes.cpp \
src/crc.cpp \
src/descriptors.cpp \
src/io.cpp \
src/merger.cpp \
src/sec2ts.cpp
HEADERS= \
inc/commontypes.h \
inc/descriptors.h \
inc/io.h \
inc/merger.h \
inc/sec2ts.h
MOPA_LIB_OBJS=$(patsubst src/%.cpp,obj/%.o,$(MOPA_LIB_SOURCES))
all: lib test
clean:
rm -f test
rm -f obj/test.o
rm -f $(MOPA_LIB_OBJS)
rm -f $(MOPA_LIB)
obj/%.o: src/%.cpp $(HEADERS)
$(CXX) $(CXXFLAGS) -I . -c -o $@ $<
obj/test.o: tests/test.cpp $(HEADERS)
$(CXX) $(CXXFLAGS) -I . -c -o $@ $<
$(MOPA_LIB): $(MOPA_LIB_OBJS)
ar cr $(MOPA_LIB) $(MOPA_LIB_OBJS)
test: obj/test.o $(MOPA_LIB)
$(CXX) -o $@ $^
.PHONY: all clean