23 lines
448 B
Makefile
23 lines
448 B
Makefile
|
include ../common.mk
|
||
|
|
||
|
BUILD_DIR = src/build
|
||
|
MAKE = cmake --build .
|
||
|
|
||
|
all: prepare build
|
||
|
|
||
|
prepare:
|
||
|
rm -rf $(BUILD_DIR)
|
||
|
mkdir -p $(BUILD_DIR)
|
||
|
cd $(BUILD_DIR); \
|
||
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
||
|
-DCMAKE_BUILD_TYPE=Release \
|
||
|
-DOPENSSL_SMALL=1 \
|
||
|
-DCMAKE_C_FLAGS_RELEASE="-Os -fdata-sections" \
|
||
|
-DCMAKE_CXX_FLAGS_RELEASE="-Os -fdata-sections" \
|
||
|
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--gc-sections" \
|
||
|
..
|
||
|
|
||
|
build:
|
||
|
cd $(BUILD_DIR); \
|
||
|
$(MAKE)
|