diff options
Diffstat (limited to 'make/gnu-real.mk')
-rw-r--r-- | make/gnu-real.mk | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/make/gnu-real.mk b/make/gnu-real.mk index e892295a6..338a5112d 100644 --- a/make/gnu-real.mk +++ b/make/gnu-real.mk @@ -1,11 +1,13 @@ -CORE_TARGS = $(patsubst %.cpp,%.o,$(wildcard *.cpp) $(wildcard modes/*.cpp)) -CMD_TARGS = $(patsubst %.cpp,%.so,$(wildcard commands/*.cpp)) -MOD_TARGS = $(patsubst %.cpp,%.so,$(wildcard modules/*.cpp)) +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 -MOD_TARGS += $(shell perl -e 'print join " ", grep s!/?$$!.so!, grep -d, <modules/m_*>') +MOD_TARGS += $(shell perl -e 'chdir "$$ENV{SOURCEPATH}/src"; print join " ", grep s!/?$$!.so!, grep -d, <modules/m_*>') -DFILES = $(shell ../make/calcdep.pl -all) +DFILES = $(shell perl $(SOURCEPATH)/make/calcdep.pl -all) all: inspircd commands modules @@ -14,13 +16,7 @@ commands: $(CMD_TARGS) modules: $(MOD_TARGS) inspircd: $(CORE_TARGS) - $(RUNCC) -o $@ $(CORELDFLAGS) $(LDLIBS) $(CORE_TARGS) - -.%.d: %.cpp - @../make/calcdep.pl -file $< - -.%.d: % - @../make/calcdep.pl -file $< + $(RUNCC) -o $@ $(CORELDFLAGS) $(LDLIBS) $^ .PHONY: all alldep commands modules |