]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - make/gnu-real.mk
Use CXXFLAGS rather than nonstandard NICEFLAGS/FLAGS/etc
[user/henk/code/inspircd.git] / make / gnu-real.mk
1 CORE_TARGS = $(patsubst %.cpp,%.o,$(wildcard *.cpp))
2 MODE_TARGS = $(patsubst %.cpp,%.o,$(wildcard modes/*.cpp))
3 CMD_TARGS = $(patsubst %.cpp,%.so,$(wildcard commands/*.cpp))
4 MOD_TARGS = $(patsubst %.cpp,%.so,$(wildcard modules/*.cpp))
5
6 CORE_TARGS += threadengines/threadengine_pthread.o
7 CORE_TARGS += socketengines/$(SOCKETENGINE).o
8 CORE_TARGS += $(MODE_TARGS)
9 MOD_TARGS += $(shell perl -e 'print join " ", grep s!([^/]+)/$$!$$1.so!, <modules/m_*/>')
10
11 DFILES = $(shell perl -e 'print join " ", grep s!([^/]+)\.cpp!.$$1.d!, <*.cpp>, <commands/*.cpp>, <modes/*.cpp>, <modules/*.cpp>, <modules/m_*/*.cpp>')
12 DFILES += $(shell perl -e 'print join " ", grep s!([^/]+)/?$$!.$$1.d!, <modules/m_*/>')
13 DFILES += socketengines/.$(SOCKETENGINE).d threadengines/.threadengine_pthread.d
14
15 all: inspircd commands modules
16
17 commands: $(CMD_TARGS)
18
19 modules: $(MOD_TARGS)
20
21 inspircd: $(CORE_TARGS)
22         $(RUNCC) -o $@ $(CORELDFLAGS) $(LDLIBS) $(CORE_TARGS)
23
24 .%.d: %.cpp
25         @../make/calcdep.pl $<
26
27 .%.d: %
28         @../make/calcdep.pl $<
29
30 .PHONY: all alldep commands modules
31
32 -include $(DFILES)