Simplify source file handling

sort removes duplicates.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2017-01-24 21:57:40 +01:00
parent e858e193a6
commit 04eb04cab6

View file

@ -4,7 +4,10 @@ include config.mk
include colors.mk
include common.mk
OSOURCE = $(filter-out ${PROJECT}/css-definitions.c, $(filter-out ${PROJECT}/dbus-interface-definitions.c, $(sort $(wildcard ${PROJECT}/*.c))))
# source files
OSOURCE = $(sort $(wildcard ${PROJECT}/*.c) \
${PROJECT}/css-definitions.c \
${PROJECT}/dbus-interface-definitions.c)
ifneq (${WITH_SQLITE},0)
INCS += $(SQLITE_INC)
@ -41,15 +44,9 @@ ifeq (,$(findstring -DLOCALEDIR,${CPPFLAGS}))
CPPFLAGS += -DLOCALEDIR=\"${LOCALEDIR}\"
endif
OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o}) \
${BUILDDIR_RELEASE}/${PROJECT}/css-definitions.o \
${BUILDDIR_RELEASE}/${PROJECT}/dbus-interface-definitions.o
OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o}) \
${BUILDDIR_DEBUG}/${PROJECT}/css-definitions.o \
${BUILDDIR_DEBUG}/${PROJECT}/dbus-interface-definitions.o
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o}) \
${BUILDDIR_GCOV}/${PROJECT}/css-definitions.o \
${BUILDDIR_GCOV}/${PROJECT}/dbus-interface-definitions.o
OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o})
OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o})
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o})
HEADER = $(wildcard ${PROJECT}/*.h)
HEADERINST = $(addprefix ${PROJECT}/,version.h document.h macros.h page.h types.h plugin-api.h links.h)