|
|
|
@ -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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|