summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorfrostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-18 00:42:44 +0000
committerfrostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-18 00:42:44 +0000
commit85ce325779c67004975f67475d3cebc05d66e197 (patch)
tree19c12b0d3cc93e6a4c888b6765caa7805cf32cb2 /src/modules
parente81bad456aa55af8b0cb31d2ffeb0672ff0c6bbf (diff)
Modules will no longer re-compile themselves if they havnt changed.
Use ./configure -update to update your module listing in the makefiles. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@636 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/Makefile22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/modules/Makefile b/src/modules/Makefile
index 60629b59c..36cbbe1cd 100644
--- a/src/modules/Makefile
+++ b/src/modules/Makefile
@@ -3,21 +3,11 @@
# Small modifications by <brain@ChatSpike.net>
#
-CXXFLAGS = -I../../include ${FLAGS}
+all: $(MODULES)
-MODS = `/bin/ls *.cpp | sed 's/.cpp//'`
-MODULES = $(MODS)
-
-MODS2 = `/bin/ls *.cpp`
-MODULES2 = $(MODS2:.cpp=.so)
-
-main:
- rm -f .make ; \
- for i in $(MODULES) ; do \
- echo "echo \"Compiling: $$i\"" >>.make ; \
- echo "$(CXX) $(CXXFLAGS) -shared -o $$i `echo $$i | sed 's/.so/.cpp/'`">>.make ; \
- done ; chmod u+x .make ; ./.make
-
-
-all: main
+%.so:
+ @$(MAKE) --no-print-directory TARGET=$(@:.so=)
+$(TARGET).so:
+ $(CC) -I../../include $(FLAGS) -shared -o $@ $(TARGET).cpp
+ @cp $(TARGET).so $(MODPATH)$(TARGET).so