summaryrefslogtreecommitdiff
path: root/src/mods/Makefile.mods.in
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2009-01-27 23:25:11 +0000
committerPaul Buetow <paul@buetow.org>2009-01-27 23:25:11 +0000
commit498c570e089b41f122584ace973a69b7590232cd (patch)
treee45ffca8cf18ac5d00a2928229d8a717a3718669 /src/mods/Makefile.mods.in
parent5dcfbb71e9e44b33caefe80f2a5d8ccd3431f3d9 (diff)
Diffstat (limited to 'src/mods/Makefile.mods.in')
-rw-r--r--src/mods/Makefile.mods.in19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mods/Makefile.mods.in b/src/mods/Makefile.mods.in
new file mode 100644
index 0000000..ca3c365
--- /dev/null
+++ b/src/mods/Makefile.mods.in
@@ -0,0 +1,19 @@
+SRCS=$(shell find ./ -name '*.cpp')
+MODS=$(addprefix ../../../mods/@CATEGORY@/, $(SRCS:.cpp=.so))
+CXX=@CXX@
+CXXFLAGS=@CXXFLAGS@
+all: mods
+${MODS}:
+ @if ! test -d `dirname $@`; then mkdir -p `dirname $@`; fi
+ @${CXX} ${CXXGLAGS} -fPIC -shared -s -o $@ ` \
+ echo $(notdir $@) | sed s/.so/.cpp/`
+ @echo "mods:@CATEGORY@:`basename $@ | sed s/\.so// | sed s/yc_//` (` \
+ du -hs $@ | awk '{ print $$1 }'`) "
+infotext:
+ @echo "===> Compiling @CATEGORY@ modules"
+mods: infotext ${MODS}
+ @echo "===> Num of @CATEGORY@ modules: `ls \
+ ../../../mods/@CATEGORY@/*.so | wc -l | sed 's/ //g;'`"
+clean:
+ @echo "===> Cleaning @CATEGORY@ modules"
+ @if test -d ../../../mods/@CATEGORY@; then rm -Rf ../../../mods/@CATEGORY@; fi