Add support for generic Makefile variables

This commit is contained in:
Ilja Kartašov 2019-04-25 15:33:18 +02:00
parent 85f427ad91
commit d8fa3f68e5
2 changed files with 8 additions and 3 deletions

View File

@ -9,6 +9,7 @@ SRC_DIR ?= src
SDK_DIR ?= sdk
OUT_DIR ?= build
LIB_DIR ?= lib
DESTDIR ?=
# Project definition
include project.mk
@ -78,8 +79,12 @@ default: library
.PHONY: all dirs clean doc install
install: library
cp $(OUT_DIR)/lib$(PROJECT_NAME).so $(PREFIX)/$(LIB_DIR)/
cp -R include/aisl $(PREFIX)/include/
$(info installing files)
@mkdir -p $(DESTDIR)$(PREFIX)/$(LIB_DIR)
@mkdir -p $(DESTDIR)$(PREFIX)/include
@cp $(OUT_DIR)/lib$(PROJECT_NAME).so $(DESTDIR)$(PREFIX)/$(LIB_DIR)
@cp -R include/aisl $(DESTDIR)$(PREFIX)/include
# vim:ft=make
#

View File

@ -51,7 +51,7 @@ PROJECT_LIBRARIES = \
# flags
PROJECT_CFLAGS = -D_POSIX_C_SOURCE=200809L
PROJECT_CFLAGS += -DDEBUG
#PROJECT_CFLAGS += -DDEBUG
#PROJECT_CFLAGS += -DAISL_WITHOUT_SSL
#PROJECT_CFLAGS += -DAISL_WITHOUT_STRINGIFIERS