summaryrefslogtreecommitdiff
path: root/make/gnu-real.mk
blob: 338a5112d976df5e846ae8ec336e6f2be2a0e223 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 'chdir "$$ENV{SOURCEPATH}/src"; print join " ", grep s!/?$$!.so!, grep -d, <modules/m_*>')

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

all: inspircd commands modules

commands: $(CMD_TARGS)

modules: $(MOD_TARGS)

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

.PHONY: all alldep commands modules

-include $(DFILES)