Browse Source

Let modules to change list of source files.

ObjPtr
Michael Uleysky 9 years ago
parent
commit
c63bbdc2ab
  1. 12
      Makefile

12
Makefile

@ -11,9 +11,11 @@ LDFLAGS+=$(OPTFLAGS) $(EXPORTFLAGS) $(WARNFLAGS) $(LIBSFLAGS)
CC=g++
ifdef MODULE
-include makemod
default: $(MODULE).so
SOURCE = $(wildcard *.cpp)
-include makemod
DEPENDS = $(subst .cpp,.d,$(SOURCE))
OBJECTS = $(subst .cpp,.o,$(SOURCE))
@ -25,7 +27,7 @@ $(MODULE).so: $(OBJECTS)
%.d: %.cpp
$(CC) $(CPPFLAGS) -MM -MT $(subst .cpp,.o,$<) $< | sed 's%\(^.*\):%\1 $@ :%g' >$@
include $(DEPENDS)
clean:
@ -36,11 +38,14 @@ distclean: clean
else
default: modules
MODDIRS = $(wildcard modules/*)
MODDIRS+= $(wildcard extramodules/*)
MODSOURCE = $(wildcard modules/*/*.cpp extramodules/*/*.cpp)
MODHEADERS = $(wildcard modules/*/*.h extramodules/*/*.h)
-include $(wildcard modules/*/makemod) $(wildcard extramodules/*/makemod)
MODOBJECTS = $(subst .cpp,.o,$(MODSOURCE))
MODDEPS = $(subst .cpp,.d,$(MODSOURCE))
@ -75,9 +80,6 @@ distclean:
make -C src distclean
rm -f bin/*
rmdir bin
-include $(wildcard modules/*/makemod) $(wildcard extramodules/*/makemod)
endif

Loading…
Cancel
Save