Commit 2498d5cf authored by Sebastian Ramacher's avatar Sebastian Ramacher

Simplify source file filtering

parent 84a1f213
...@@ -7,14 +7,14 @@ include common.mk ...@@ -7,14 +7,14 @@ include common.mk
# source files # source files
OSOURCE = $(sort $(wildcard ${PROJECT}/*.c) \ OSOURCE = $(sort $(wildcard ${PROJECT}/*.c) \
${PROJECT}/css-definitions.c) ${PROJECT}/css-definitions.c)
SOURCE_FILTER =
ifneq (${WITH_SQLITE},0) ifneq (${WITH_SQLITE},0)
INCS += $(SQLITE_INC) INCS += $(SQLITE_INC)
LIBS += $(SQLITE_LIB) LIBS += $(SQLITE_LIB)
SOURCE = $(OSOURCE)
CPPFLAGS += -DWITH_SQLITE CPPFLAGS += -DWITH_SQLITE
else else
SOURCE = $(filter-out ${PROJECT}/database-sqlite.c,$(OSOURCE)) SOURCE_FILTER += ${PROJECT}/database-sqlite.c
endif endif
ifneq ($(WITH_MAGIC),0) ifneq ($(WITH_MAGIC),0)
...@@ -50,6 +50,7 @@ CPPFLAGS += -DDBUSINTERFACEDIR=\"${DBUSINTERFACEDIR}\" ...@@ -50,6 +50,7 @@ CPPFLAGS += -DDBUSINTERFACEDIR=\"${DBUSINTERFACEDIR}\"
endif endif
endif endif
SOURCE = $(filter-out $(SOURCE_FILTER),$(OSOURCE))
OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o}) OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o})
OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o}) OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o})
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o}) OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment