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.
Kaleidoscope/testing/common/Makefile

36 lines
905 B

LIB_DIR ?= ${PWD}/lib
OBJ_DIR ?= ${PWD}/obj
CXX_FILES=$(wildcard *.cpp)
LIB_FILE=common.a
OBJ_FILES=$(patsubst %.cpp,${OBJ_DIR}/%.o,$(CXX_FILES))
Makefile: ${LIB_DIR}/${LIB_FILE}
@:
${LIB_DIR}/${LIB_FILE}: ${OBJ_FILES}
mkdir -p "${LIB_DIR}"
ar rcs "${LIB_DIR}/${LIB_FILE}" ${OBJ_FILES}
${OBJ_DIR}/%.o: %.cpp
@echo "compile $@"
mkdir -p "${OBJ_DIR}"
g++ -o "$@" -c \
-I../.. \
-I../../src \
-I../../../../../virtual/cores/arduino \
-I../../../Kaleidoscope-HIDAdaptor-KeyboardioHID/src \
-I../../../KeyboardioHID/src \
-I../../testing/googletest/googlemock/include \
-I../../testing/googletest/googletest/include \
-DARDUINO=10607 \
-DARDUINO_AVR_MODEL01 \
'-DKALEIDOSCOPE_HARDWARE_H="Kaleidoscope-Hardware-Model01.h"' \
-DKALEIDOSCOPE_VIRTUAL_BUILD=1 \
-DKEYBOARDIOHID_BUILD_WITHOUT_HID=1 \
-DUSBCON=dummy \
-DARDUINO_ARCH_AVR=1 \
'-DUSB_PRODUCT="Model 01"' \
$<