summaryrefslogtreecommitdiff
path: root/make/gnu-real.mk
blob: ea9843574f39e8ee6c45fd881e26e8ab090bc8a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SRC = $(SOURCEPATH)/src
VPATH = $(SRC)
CORE_TARGS = $(patsubst $(SRC)/%.cpp,%.o,$(wildcard $(SRC)/*.cpp $(SRC)/modes/*.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 'chdir "$$ENV{SOURCEPATH}/src"; print join " ", grep s!/?$$!.so!, grep -d, <modules/m_*>')

DFILES = $(shell perl $(SOURCEPATH)/make/calcdep.pl -all)

all: inspircd modules

modules: $(MOD_TARGS)

inspircd: $(CORE_TARGS)
	$(RUNCC) -o $@ $(CORELDFLAGS) $(LDLIBS) $^

.PHONY: all alldep modules

-include $(DFILES)