2009-09-01 22:44:44 +00:00
|
|
|
CORE_TARGS = $(patsubst %.cpp,%.o,$(wildcard *.cpp) $(wildcard modes/*.cpp))
|
2009-09-01 15:04:40 +00:00
|
|
|
CMD_TARGS = $(patsubst %.cpp,%.so,$(wildcard commands/*.cpp))
|
|
|
|
MOD_TARGS = $(patsubst %.cpp,%.so,$(wildcard modules/*.cpp))
|
|
|
|
|
2009-09-01 22:44:44 +00:00
|
|
|
CORE_TARGS += socketengines/$(SOCKETENGINE).o threadengines/threadengine_pthread.o
|
|
|
|
MOD_TARGS += $(shell perl -e 'print join " ", grep s!/?$$!.so!, grep -d, <modules/m_*>')
|
2009-09-01 15:04:40 +00:00
|
|
|
|
2009-09-01 22:44:44 +00:00
|
|
|
DFILES = $(shell ../make/calcdep.pl -all)
|
2009-09-01 15:04:40 +00:00
|
|
|
|
|
|
|
all: inspircd commands modules
|
|
|
|
|
|
|
|
commands: $(CMD_TARGS)
|
|
|
|
|
|
|
|
modules: $(MOD_TARGS)
|
|
|
|
|
|
|
|
inspircd: $(CORE_TARGS)
|
2009-09-01 15:06:39 +00:00
|
|
|
$(RUNCC) -o $@ $(CORELDFLAGS) $(LDLIBS) $(CORE_TARGS)
|
2009-09-01 15:04:40 +00:00
|
|
|
|
2009-09-01 15:05:11 +00:00
|
|
|
.%.d: %.cpp
|
2009-09-01 22:44:44 +00:00
|
|
|
@../make/calcdep.pl -file $<
|
2009-09-01 15:04:40 +00:00
|
|
|
|
2009-09-01 15:06:11 +00:00
|
|
|
.%.d: %
|
2009-09-01 22:44:44 +00:00
|
|
|
@../make/calcdep.pl -file $<
|
2009-09-01 15:06:11 +00:00
|
|
|
|
2009-09-01 15:04:48 +00:00
|
|
|
.PHONY: all alldep commands modules
|
2009-09-01 15:04:40 +00:00
|
|
|
|
|
|
|
-include $(DFILES)
|