]>
Commit | Line | Data |
---|---|---|
ef4ada0c H |
1 | # Makefile for Denora. |
2 | # | |
4b2a29c9 | 3 | # (c) 2004-2013 Denora Team |
3876efee | 4 | # Contact us at info@denorastats.org |
ef4ada0c H |
5 | # |
6 | # Please read COPYING and README for further details. | |
7 | # | |
8 | # Based on the original code of Anope by Anope Team. | |
9 | # Based on the original code of Thales by Lucas. | |
10 | # | |
f2086a10 | 11 | # |
ef4ada0c H |
12 | # |
13 | ||
14 | CC=@CC@ | |
15 | INCLUDEDIR=../include | |
16 | DENORALIBS=@DENORALIBS@ | |
17 | BASEOPT=-O2 | |
18 | CFLAGS=@CFLAGS@ | |
19 | OPCFLAGS=@OPCFLAGS@ | |
20 | STRICT=@STRICT@ | |
21 | ANSI=-Wall -ansi -pedantic | |
22 | PROFILE=-pg | |
23 | LDPROFILE= | |
24 | SHELL=/bin/sh | |
25 | SUBDIRS=src | |
26 | BINDEST=@BINDEST@ | |
27 | DATDEST=@DATDEST@ | |
28 | INSTALL=@INSTALL@ | |
29 | RM=@RM@ | |
30 | CP=@CP@ | |
31 | TOUCH=@TOUCH@ | |
32 | MODULE_PATH=@MODULE_PATH@ | |
33 | MYSQL=@MYSQL@ | |
23c4c45e | 34 | MYSQL_CLIENT_LIBS=@MYSQL_CLIENT_LIBS@ |
ef4ada0c H |
35 | LDFLAGS=@LDFLAGS@ |
36 | RUNGROUP=@RUNGROUP@ | |
37 | SHARED=@SHARED@ | |
38 | RDYNAMNIC=@RDYNAMNIC@ | |
39 | MODULEFLAGS=@MODULEFLAGS@ | |
40 | ||
584e21e2 | 41 | |
9896eea1 | 42 | all: language headers build core protocols modules |
ef4ada0c H |
43 | strict: strict_language headers strict_build strict_core strict_protocols strict_modules |
44 | ansi: ansi_language headers ansi_build ansi_core ansi_protocols ansi_modules | |
45 | profile: language headers profile_build core profile_protocols profile_modules | |
46 | optimized: language headers optimized_build optimized_core optimized_protocols optimized_modules | |
47 | ||
48 | MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'DENORALIBS=${DENORALIBS}' \ | |
2e05a07c | 49 | 'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \ |
ef4ada0c | 50 | 'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \ |
2e05a07c | 51 | 'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \ |
52 | 'RUNGROUP=${RUNGROUP}' 'MODULE_PATH=${MODULE_PATH}'\ | |
53 | 'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}' 'RDYNAMNIC=${RDYNAMNIC}' | |
ef4ada0c H |
54 | |
55 | build: | |
2e05a07c | 56 | @for i in $(SUBDIRS); do \ |
ef4ada0c H |
57 | echo "*** Building $$i";\ |
58 | ( cd $$i; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS}' all; ) \ | |
59 | done | |
60 | ||
61 | strict_build: | |
2e05a07c | 62 | @for i in $(SUBDIRS); do \ |
ef4ada0c H |
63 | echo "*** Strict Building $$i";\ |
64 | ( cd $$i; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} $(STRICT)' all; ) \ | |
65 | done | |
66 | ||
67 | optimized_build: | |
2e05a07c | 68 | @for i in $(SUBDIRS); do \ |
ef4ada0c H |
69 | echo "*** Strict Building $$i";\ |
70 | ( cd $$i; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} ${OPCFLAGS}' all; ) \ | |
71 | done | |
72 | ||
73 | ansi_build: | |
2e05a07c | 74 | @for i in $(SUBDIRS); do \ |
ef4ada0c H |
75 | echo "*** Strict Building $$i";\ |
76 | ( cd $$i; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} $(ANSI)' all; ) \ | |
77 | done | |
78 | ||
79 | profile_build: | |
2e05a07c | 80 | @for i in $(SUBDIRS); do \ |
ef4ada0c H |
81 | echo "*** Strict Building $$i";\ |
82 | ( cd $$i; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} $(PROFILE)' 'LDFLAGS=${LDFLAGS} ${PROFILE}' all; ) \ | |
83 | done | |
84 | ||
85 | modules: build | |
2e05a07c | 86 | (cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS}' all; ) |
87 | @echo "*** All done, now (g)make install to install Denora/Modules"; | |
ef4ada0c H |
88 | |
89 | core: build | |
2e05a07c | 90 | @echo "*** Building Core modules"; |
91 | (cd src/ ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS}' core; ) | |
ef4ada0c H |
92 | |
93 | strict_core: strict_build | |
2e05a07c | 94 | @echo "*** Building Core modules"; |
95 | (cd src/core ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} $(STRICT)' all; ) | |
ef4ada0c H |
96 | |
97 | optimized_core: optimized_build | |
2e05a07c | 98 | @echo "*** Building Core modules"; |
99 | (cd src/core ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(CFLAGS) $(OPCFLAGS)' all; ) | |
ef4ada0c H |
100 | |
101 | ansi_core: ansi_build | |
2e05a07c | 102 | @echo "*** Building Core modules"; |
103 | (cd src/core ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} $(ANSI)' all; ) | |
ef4ada0c H |
104 | |
105 | strict_modules: strict_build | |
2e05a07c | 106 | (cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} $(STRICT)' all; ) |
107 | @echo "*** All done, now (g)make install to install Denora/Modules"; | |
ef4ada0c H |
108 | |
109 | ansi_modules: ansi_build | |
2e05a07c | 110 | (cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} $(ANSI)' all; ) |
111 | @echo "*** All done, now (g)make install to install Denora/Modules"; | |
ef4ada0c H |
112 | |
113 | optimized_modules: optimized_build | |
2e05a07c | 114 | (cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(CFLAGS) $(OPCFLAGS)' all; ) |
115 | @echo "*** All done, now (g)make install to install Denora/Modules"; | |
ef4ada0c H |
116 | |
117 | profile_modules: profile_build | |
2e05a07c | 118 | (cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' all; ) |
119 | @echo "*** All done, now (g)make install to install Denora/Modules"; | |
ef4ada0c H |
120 | |
121 | protocols: build | |
2e05a07c | 122 | (cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS}' all; ) |
123 | @echo "*** All done, now (g)make install to install Denora/Protocols"; | |
ef4ada0c H |
124 | |
125 | strict_protocols: strict_build | |
2e05a07c | 126 | (cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} $(STRICT)' all; ) |
127 | @echo "*** All done, now (g)make install to install Denora/Protocols"; | |
ef4ada0c H |
128 | |
129 | optimized_protocols: optimized_build | |
2e05a07c | 130 | (cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(CFLAGS) $(OPCFLAGS)' all; ) |
131 | @echo "*** All done, now (g)make install to install Denora/Protocols"; | |
ef4ada0c H |
132 | |
133 | ansi_protocols: ansi_build | |
2e05a07c | 134 | (cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} $(ANSI)' all; ) |
135 | @echo "*** All done, now (g)make install to install Denora/Protocols"; | |
ef4ada0c H |
136 | |
137 | profile_protocols: profile_build | |
2e05a07c | 138 | (cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' all; ) |
139 | @echo "*** All done, now (g)make install to install Denora/Protocols"; | |
140 | ||
ef4ada0c H |
141 | |
142 | language: | |
2e05a07c | 143 | (cd lang ; $(MAKE) ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS}' all language.h ; cp language.h ../include/) |
ef4ada0c H |
144 | |
145 | strict_language: | |
2e05a07c | 146 | (cd lang ; $(MAKE) ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} $(STRICT)' all language.h ; cp language.h ../include/) |
ef4ada0c H |
147 | |
148 | ansi_language: | |
2e05a07c | 149 | (cd lang ; $(MAKE) ${MAKEARGS} 'CFLAGS=$(BASEOPT) ${CFLAGS} $(ANSI)' all language.h ; cp language.h ../include/) |
ef4ada0c H |
150 | |
151 | headers: | |
2e05a07c | 152 | (cd include ; ${MAKE} ${MAKEARGS} ) |
ef4ada0c H |
153 | |
154 | clean: | |
2e05a07c | 155 | (cd lang ; ${MAKE} clean ) |
156 | (cd include ; ${MAKE} clean ) | |
157 | (cd src ; ${MAKE} clean ) | |
ef4ada0c H |
158 | |
159 | distclean: | |
2e05a07c | 160 | (cd lang ; ${MAKE} distclean ) |
161 | (cd include ; ${MAKE} distclean ) | |
162 | (cd src ; ${MAKE} distclean ) | |
163 | rm -f config.log config.status config.cache Makefile install-sh src/bin/denorarc src/bin/geoipupd | |
ef4ada0c | 164 | |
aa037017 | 165 | recompile: |
2e05a07c | 166 | cp config.cache config.bak |
167 | (${MAKE} distclean) | |
168 | cp config.bak config.cache | |
169 | ./Config -quick | |
170 | (${MAKE} strict && ${MAKE} install) | |
aa037017 | 171 | |
ef4ada0c | 172 | install: DUMMY |
2e05a07c | 173 | (cd src ; ${MAKE} ${MAKEARGS} install) |
ef4ada0c | 174 | |
2e05a07c | 175 | DUMMY: |