Force object renaming to avoid constraint.o being overwritten

The GUI application and library share some object files but don't
enable object renaming resulting in the second compilation overwriting
the results of the first compilation.  This can be fixed by setting
explicit preprocessor flags for one compilation.  The actual problem,
however, is that recursive make is used in an inappropriate way; two
Makefiles shouldn't refer to the same source files.  In this case,
libslvs should be under src/ and handled by the same Makefile, in
which case the issue would have been obvious when the Makefile was
written in the first place.
pull/3/head
Roland Lutz 2015-03-01 15:46:36 +01:00
parent 3b4897c833
commit 2622684ed5
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,10 @@ noinst_LIBRARIES = libslvs.a
CDemo_SOURCES = CDemo.c
# Set explicit CPPFLAGS to force renaming of the object files.
# Otherwise, the object files for the GUI application will be overwritten.
libslvs_a_CPPFLAGS = $(AM_CPPFLAGS)
libslvs_a_SOURCES = \
slvs.h \
lib.cpp \