From 3841c4b04a96389a4661535d12d5215a621d8736 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 16 Sep 2009 22:42:36 +0000 Subject: Attempt to revert r11734 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11735 e03df62e-2008-0410-955e-edbf42e46eb7 --- make/bsd-real.mk | 5 ++++- make/calcdep.pl | 2 +- make/gnu-real.mk | 7 +++++-- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'make') diff --git a/make/bsd-real.mk b/make/bsd-real.mk index 1ea3e2916..13cb2cce8 100644 --- a/make/bsd-real.mk +++ b/make/bsd-real.mk @@ -1,5 +1,6 @@ VPATH = $(SOURCEPATH)/src CORE_TARGS != perl -e 'chdir "$$ENV{SOURCEPATH}/src"; print join " ", grep s/\.cpp/.o/, <*.cpp>, ' +CMD_TARGS != perl -e 'chdir "$$ENV{SOURCEPATH}/src"; print join " ", grep s/\.cpp/.so/, ' MOD_TARGS != perl -e 'chdir "$$ENV{SOURCEPATH}/src"; print join " ", grep s/\.cpp/.so/, ' MDIR_TARGS != perl -e 'chdir "$$ENV{SOURCEPATH}/src"; print join " ", grep s!/?$$!.so!, grep -d, ' @@ -7,7 +8,9 @@ CORE_TARGS += socketengines/$(SOCKETENGINE).o threadengines/threadengine_pthread DFILES != perl $(SOURCEPATH)/make/calcdep.pl -all -all: inspircd modules +all: inspircd commands modules + +commands: $(CMD_TARGS) modules: $(MOD_TARGS) $(MDIR_TARGS) diff --git a/make/calcdep.pl b/make/calcdep.pl index d8b4e292b..261b6ec18 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -51,7 +51,7 @@ sub dep_cpp { my($file, $dfile) = @_; gendep $file; my($path,$base) = $file =~ m#^((?:.*/)?)([^/]+)\.cpp# or die "Bad file $file"; - my $ext = $path eq 'modules/' ? '.so' : '.o'; + my $ext = $path eq 'modules/' || $path eq 'commands/' ? '.so' : '.o'; my $out = "$path$base$ext"; $dfile = "$baseout/$path.$base.d" unless defined $dfile; diff --git a/make/gnu-real.mk b/make/gnu-real.mk index ea9843574..338a5112d 100644 --- a/make/gnu-real.mk +++ b/make/gnu-real.mk @@ -1,6 +1,7 @@ SRC = $(SOURCEPATH)/src VPATH = $(SRC) CORE_TARGS = $(patsubst $(SRC)/%.cpp,%.o,$(wildcard $(SRC)/*.cpp $(SRC)/modes/*.cpp)) +CMD_TARGS = $(patsubst $(SRC)/%.cpp,%.so,$(wildcard $(SRC)/commands/*.cpp)) MOD_TARGS = $(patsubst $(SRC)/%.cpp,%.so,$(wildcard $(SRC)/modules/*.cpp)) CORE_TARGS += socketengines/$(SOCKETENGINE).o threadengines/threadengine_pthread.o @@ -8,13 +9,15 @@ MOD_TARGS += $(shell perl -e 'chdir "$$ENV{SOURCEPATH}/src"; print join " ", gre DFILES = $(shell perl $(SOURCEPATH)/make/calcdep.pl -all) -all: inspircd modules +all: inspircd commands modules + +commands: $(CMD_TARGS) modules: $(MOD_TARGS) inspircd: $(CORE_TARGS) $(RUNCC) -o $@ $(CORELDFLAGS) $(LDLIBS) $^ -.PHONY: all alldep modules +.PHONY: all alldep commands modules -include $(DFILES) -- cgit v1.2.3