You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.5 KiB
65 lines
1.5 KiB
5 years ago
|
CC = clang
|
||
|
CXX = clang++
|
||
|
|
||
5 years ago
|
PHONELIBS = ../../../../phonelibs
|
||
|
COMMON = ../../../common
|
||
5 years ago
|
|
||
|
WARN_FLAGS = -Werror=implicit-function-declaration \
|
||
|
-Werror=incompatible-pointer-types \
|
||
|
-Werror=int-conversion \
|
||
|
-Werror=return-type \
|
||
|
-Werror=format-extra-args
|
||
|
|
||
|
CFLAGS = -std=gnu11 -fPIC -O2 $(WARN_FLAGS)
|
||
5 years ago
|
CXXFLAGS = -std=c++1z -fPIC -O2 $(WARN_FLAGS)
|
||
5 years ago
|
|
||
|
NANOVG_FLAGS = -I$(PHONELIBS)/nanovg
|
||
|
|
||
|
OPENGL_LIBS = -lGLESv3
|
||
|
|
||
|
FRAMEBUFFER_LIBS = -lutils -lgui -lEGL
|
||
|
|
||
|
OBJS = text.o \
|
||
5 years ago
|
$(COMMON)/framebuffer.o \
|
||
|
$(COMMON)/util.o \
|
||
|
$(COMMON)/touch.o \
|
||
5 years ago
|
$(PHONELIBS)/nanovg/nanovg.o \
|
||
|
opensans_regular.o \
|
||
|
|
||
|
DEPS := $(OBJS:.o=.d)
|
||
|
|
||
|
.PHONY: all
|
||
|
all: text
|
||
|
|
||
|
text: $(OBJS)
|
||
|
@echo "[ LINK ] $@"
|
||
|
$(CXX) -fPIC -o '$@' $^ \
|
||
|
-s \
|
||
|
$(FRAMEBUFFER_LIBS) \
|
||
|
-L/system/vendor/lib64 \
|
||
|
$(OPENGL_LIBS) \
|
||
|
-lm -llog
|
||
|
|
||
5 years ago
|
opensans_regular.o: ../../../assets/fonts/opensans_regular.ttf
|
||
5 years ago
|
@echo "[ bin2o ] $@"
|
||
|
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'
|
||
|
|
||
|
%.o: %.cc
|
||
|
mkdir -p $(@D)
|
||
|
@echo "[ CXX ] $@"
|
||
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
|
||
5 years ago
|
-I../../../selfdrive \
|
||
|
-I../../../ \
|
||
5 years ago
|
-I$(PHONELIBS)/android_frameworks_native/include \
|
||
|
-I$(PHONELIBS)/android_system_core/include \
|
||
|
-I$(PHONELIBS)/android_hardware_libhardware/include \
|
||
|
$(NANOVG_FLAGS) \
|
||
|
-c -o '$@' '$<'
|
||
|
|
||
|
|
||
|
.PHONY: clean
|
||
|
clean:
|
||
|
rm -f text $(OBJS) $(DEPS)
|
||
|
|
||
|
-include $(DEPS)
|