]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - .Makefile.inc
Change link of official third party repo to point to gitorious repo.
[user/henk/code/inspircd.git] / .Makefile.inc
1 #               InspIRCd Main Makefile
2 #
3 #       (C) InspIRCd Development Team, 2002-2009
4 # This file is automagically generated by configure, from
5 #     .Makefile.inc. Any changes make will go away!
6 #   Please do not edit unless you know what you're doing.
7 #
8
9 @GNU_ONLY COMPILE_ROOT = $(shell pwd)
10 @BSD_ONLY COMPILE_ROOT != pwd
11
12 @IFDEF D
13     NICEFLAGS = @DEVELOPER@
14     HEADER = debug-header
15 @ENDIF
16
17 NICEFLAGS ?= @FLAGS@
18 HEADER ?= std-header
19
20 NICEFLAGS += -I$(COMPILE_ROOT)/include
21
22 CC = @CC@
23 FLAGS = $(NICEFLAGS) -pedantic
24 LDLIBS = @LDLIBS@
25 BASE = "@BASE_DIR@"
26 CONPATH = "@CONFIG_DIR@"
27 MODPATH = "@MODULE_DIR@"
28 BINPATH = "@BINARY_DIR@"
29 LAUNCHDPATH = "/System/Library/LaunchDaemons"
30 LIBPATH = "@LIBRARY_DIR@"
31 MODULES = @MODULES@
32 INSTMODE = 0755
33 @GNU_ONLY MAKEFLAGS += --no-print-directory
34
35 @IFDEF V
36     RUNCC = $(CC)
37 @ELSE
38     @GNU_ONLY MAKEFLAGS += --silent
39     RUNCC = $(COMPILE_ROOT)/make/run-cc.pl $(CC)
40 @ENDIF
41
42 @GNU_ONLY export COMPILE_ROOT RUNCC FLAGS NICEFLAGS CC LDLIBS MODULES MODPATH LIBPATH INSTMODE
43 @BSD_ONLY MAKEARGS = -s 'RUNCC=${RUNCC}' 'FLAGS=${FLAGS}' 'NICEFLAGS=${NICEFLAGS}' 'CC=${CC}' 'LDLIBS=${LDLIBS}' 'MODULES=${MODULES}' 'MODPATH=${MODPATH}' 'LIBPATH=${LIBPATH}' 'INSTMODE=${INSTMODE}'
44
45 # Default target
46
47 @IFDEF M
48    _all: module
49 @ENDIF
50
51 all: ircd mods finishmessage
52
53 debug:
54         @${MAKE} D=1 all
55
56 debug-header:
57         @echo "*************************************"
58         @echo "*    BUILDING WITH DEBUG SYMBOLS    *"
59         @echo "*                                   *"
60         @echo "*   This will take a *long* time.   *"
61         @echo "*  Please be aware that this build  *"
62         @echo "*  will consume a very large amount *"
63         @echo "*  of disk space (150MB+), and can  *"
64         @echo "*  run slower. Use the debug build  *"
65         @echo "*  for module development or if you *"
66         @echo "*    are experiencing problems.     *"
67         @echo "*                                   *"
68         @echo "*************************************"
69
70 std-header:
71         @echo "*************************************"
72         @echo "*       BUILDING INSPIRCD           *"
73         @echo "*                                   *"
74         @echo "*   This will take a *long* time.   *"
75         @echo "*     Why not read our wiki at      *"
76         @echo "*     http://wiki.inspircd.org      *"
77         @echo "*  while you wait for make to run?  *"
78         @echo "*************************************"
79
80 ircd: $(HEADER)
81         @${MAKE} -C src $(MAKEARGS) inspircd commands
82
83 mods: $(HEADER)
84         @${MAKE} -C src/modules $(MAKEARGS)
85
86 # Make this depend on 'ircd' and 'mods', so its always output last even with -j
87 finishmessage: ircd mods
88         @echo ""
89         @echo "*************************************"
90         @echo "*        BUILD COMPLETE!            *"
91         @echo "*                                   *"
92         @echo "*   To install InspIRCd, type:      *"
93         @echo "*         make install              *"
94         @echo "*************************************"
95
96 install: ircd mods@EXTRA_DIR@
97         @-install -d -m $(INSTMODE) $(BASE)
98         @-install -d -m $(INSTMODE) $(LIBPATH)
99         @-install -d -m $(INSTMODE) $(BINPATH)
100         @-install -d -m $(INSTMODE) $(CONPATH)
101         @-install -d -m $(INSTMODE) $(MODPATH)
102         -install -m $(INSTMODE) @STARTSCRIPT@ $(@DESTINATION@) 2>/dev/null
103 @INSTALL_LIST@  @echo ""
104         @echo "*************************************"
105         @echo "*        INSTALL COMPLETE!          *"
106         @echo "*                                   *"
107         @echo "* It is safe to ignore any messages *"
108         @echo "* related to copying of conf files. *"
109         @echo "*                                   *"
110         @echo "* REMEMBER TO EDIT YOUR CONFIG FILE *"
111         @echo "*************************************"
112
113 module:
114         @BSD_ONLY @${MAKE} -C src/modules $(MAKEARGS) ${M:S/.so$//}.so
115         @GNU_ONLY @${MAKE} -C src/modules $(MAKEARGS) $(M:.so=).so
116
117 clean:
118         @echo Cleaning...
119         @rm -f src/inspircd src/modes/modeclasses.a
120         @rm -f src/*.so src/modules/*.so src/commands/*.so src/modules/*/*.so
121         @rm -f src/*.o src/*/*.o src/modules/*/*.o
122         @echo Completed.
123
124 modclean:
125         rm -f src/modules/*.so
126         rm -f src/modules/*.o
127         rm -f src/modules/*/*.so
128         rm -f src/modules/*/*.o
129
130 deinstall:
131 @UNINSTALL_LIST@
132
133 squeakyclean: distclean
134
135 launchd_dir:
136         @-install -d -m $(INSTMODE) ${LAUNCHDPATH}
137
138 configureclean:
139         rm -f .config.cache
140         rm -f src/modules/Makefile
141         rm -f src/commands/Makefile
142         rm -f src/Makefile
143         -rm -f Makefile
144         rm -f BSDmakefile
145         rm -f GNUmakefile
146         rm -f include/inspircd_config.h
147         rm -f include/inspircd_se_config.h
148
149 distclean: modclean clean configureclean
150
151 help:
152         @echo 'InspIRCd Makefile'
153         @echo ''
154         @echo 'Use: ${MAKE} [flags] [targets]'
155         @echo ''
156         @echo 'Flags:'
157         @echo ' V=1       Show the full command being executed instead of "BUILD: dns.cpp"'
158         @echo ' D=1       Enable debug build, for module development or crash tracing'
159         @echo ' -j <N>    Run a parallel build using N jobs'
160         @echo ''
161         @echo 'User targets:'
162         @echo ' all       Complete build of InspIRCd, without installing'
163         @echo ' install   Build and install InspIRCd to the directory chosen in ./configure'
164         @echo '           Currently installs to ${BASE}'
165         @echo ' debug     Compile a debug build. Equivalent to "make D=1 all"'
166         @echo ' module    Builds a single module, which is specified by "M=m_modname"'
167         @echo '           The command "make M=m_modname" is a shortcut for this target'
168         @echo ''
169         @echo ' clean     Cleans object files produced by the compile'
170         @echo ' distclean Cleans all files produced by compile and ./configure'
171         @echo ' deinstall Removes the files created by "make install"'
172         @echo
173
174 .PHONY: all help debug debug-header std-header ircd mods finishmessage install module clean modclean deinstall squeakyclean launchd_dir configureclean