solvespace/exposed/Makefile.am
Roland Lutz 2622684ed5 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.
2015-03-02 21:46:11 +01:00

46 lines
855 B
Makefile

## exposed/Makefile.am
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = -DLIBRARY -I$(top_srcdir)/src
AM_LDFLAGS = -L.
noinst_PROGRAMS = CDemo
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 \
../src/util.cpp \
../src/entity.cpp \
../src/expr.cpp \
../src/constraint.cpp \
../src/constrainteq.cpp \
../src/system.cpp
CDemo_LDADD =
if HAVE_FLTK
CDemo_SOURCES += ../src/fltk/fltkutil.cpp
CDemo_LDADD += $(FLTK_LDFLAGS) -lX11 -lGL -lGLU $(LIBSPNAV_LIBS)
endif
if WIN32
CDemo_SOURCES += ../src/win32/w32util.cpp
endif
CDemo_LDADD += -lslvs
EXTRA_DIST = \
DOC.txt \
Makefile.msvc \
VbDemo.vb
## end exposed/Makefile.am