diff options
Diffstat (limited to 'Makefile.common')
-rw-r--r-- | Makefile.common | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Makefile.common b/Makefile.common index cd984f42a7..e998a20a5e 100644 --- a/Makefile.common +++ b/Makefile.common @@ -47,15 +47,17 @@ ifdef BUILD_PLUGINS CXXFLAGS += -DDYNAMIC_MODULES # Uncomment these for Mac OS X -#PLUGIN_LDFLAGS += -bundle -bundle_loader $(EXECUTABLE) -#LDFLAGS += -all_load -#LIBS += -ldl +#PLUGIN_LDFLAGS += -bundle -bundle_loader $(EXECUTABLE) +#PRE_OBJS_FLAGS := -all_load +#POST_OBJS_FLAGS := +#LIBS += -ldl # Uncomment these for Linux -CXXFLAGS += -fpic -PLUGIN_LDFLAGS += -shared -LDFLAGS += -Wl,--export-dynamic -LIBS += -ldl +CXXFLAGS += -fpic +PLUGIN_LDFLAGS += -shared +PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive +POST_OBJS_FLAGS := -Wl,-no-whole-archive +LIBS += -ldl endif @@ -119,7 +121,7 @@ base/main.o: $(filter-out base/libbase.a,$(OBJS)) # The build rule for the ScummVM executable $(EXECUTABLE): $(OBJS) - $(CXX) $(LDFLAGS) $+ $(LIBS) -o $@ + $(CXX) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@ distclean: clean $(RM_REC) $(DEPDIRS) |