• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1CC := g++
2CXXFLAGS += -g -O0 -Wall -Werror -Wno-unused -Winit-self \
3	-Wpointer-arith -Werror=sign-compare -std=gnu++11 \
4	-Werror=return-type -fno-permissive -Wno-deprecated-declarations \
5	-fno-exceptions
6TARGET := unittest
7BASE := ../../..
8AVBDIR := $(BASE)/app/avb
9
10INCLUDES := \
11	-I $(BASE)/lib/include \
12	-I $(AVBDIR) \
13	-I $(BASE)/lib/lib/libstdc++-trusty/include \
14	-I $(BASE)/$(LKROOT)/include/uapi \
15	-I $(BASE)/lib/include/user \
16
17DEFINES := -DSTORAGE_FAKE
18SOURCES := \
19	$(AVBDIR)/avb_manager.cpp \
20	$(AVBDIR)/avb_messages.cpp \
21  unittest.cpp
22OBJECTS := $(SOURCES:%.cpp=%.o)
23
24$(TARGET): $(OBJECTS)
25	$(CC) $(OBJECTS) -o $(TARGET)
26
27%.o: %.cpp
28	$(CC) $(INCLUDES) $(DEFINES) $(CXXFLAGS) -c $< -o $@
29
30clean:
31	rm $(AVBDIR)/*.o *.o $(TARGET)
32