PV1_MakeProject/build/Makefile.app.cross

85 lines
2.0 KiB
Makefile
Raw Permalink Normal View History

2018-07-05 02:19:12 +00:00
include Makefile.def.cross
# target name, the target name must have the same name of c source file
TARGET_NAME=dbus
# target
# for linux module driver: KO
# for application: EXE
# for dynamic library: DLL
TARGET_TYPE = EXE
# target object
# for application: APP
# for device driver: DRV
TARGET_OBJ = APP
TARGET_BOX =
#debug mode or release mode
DEBUG = TRUE
PLAT_R16 ?= TRUE
PLAT_R311 ?= TRUE
2018-07-05 02:19:12 +00:00
PLAT_LINUX ?= TRUE
PLAT_WIN32 ?= FALSE
PLAT_WIN64 ?= FALSE
VPATH = ../Example
# source code
# set the source file, don't used .o because of ...
# MRS Board Source Files
PLAT_R16_SRCS = main.c
PLAT_R311_SRCS := $(PLAT_R16_SRCS)
2018-07-05 02:19:12 +00:00
PLAT_LINUX_SRCS := $(PLAT_R16_SRCS)
# gcc CFLAGS
2018-07-05 02:19:12 +00:00
PLAT_R16_CFLAGS := -I./ -I../include
PLAT_R311_CFLAGS := $(PLAT_R16_CFLAGS)
2018-07-05 02:19:12 +00:00
PLAT_LINUX_CFLAGS := $(PLAT_R16_CFLAGS) -I/usr/include/dbus-1.0/ -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include/
PLAT_LINUX_CFLAGS += -I../linux32/inc/ -I../linux32/inc/cjson/ -I../linux32/inc/uthash/
R16_LIBS := $(COMMON_R16_LIBS) -lreadline -lcurses
R16_LIBS += ./libuvdbus-r16.so
2018-09-18 08:09:12 +00:00
R311_LIBS := $(COMMON_R311_LIBS) -lreadline -lcurses
R311_LIBS += ./libuvdbus-r311.so
2018-07-05 02:19:12 +00:00
LINUX_LIBS := $(COMMON_LINUX_LIBS) -lreadline -lnghttp2
LINUX_LIBS += ./libuvdbus-linux.so
ifeq ($(PLAT_R16), TRUE)
DEPEND_LIB := ./debug/libuvdbus-r16.so
USER_CLEAN_ITEMS += ./libuvdbus-r16.so
endif
ifeq ($(PLAT_R311), TRUE)
DEPEND_LIB += ./debug/libuvdbus-r311.so
USER_CLEAN_ITEMS += ./libuvdbus-r311.so
endif
2018-07-05 02:19:12 +00:00
ifeq ($(PLAT_LINUX), TRUE)
DEPEND_LIB += ./debug/libuvdbus-linux.so
USER_CLEAN_ITEMS += ./libuvdbus-linux.so
endif
# this line must be at below of thus, because of...
include /opt/common/Makefile.cross
ifneq ($(MAKECMDGOALS), clean)
ifneq ($(MAKECMDGOALS), cleanall)
ifneq ($(notdir $(DEPEND_LIB)), $(wildcard $(DEPEND_LIB)))
$(shell $(CP) $(DEPEND_LIB) ./)
endif
endif
endif
ifeq ($(MAKECMDGOALS), )
$(shell find ./ -name $(TARGET)-*.exe -delete)
else
ifeq ($(MAKECMDGOALS), all)
$(shell find ./ -name "$(TARGET)-*.exe" -delete)
endif
endif