ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/vendor/ircservices-5.1.24/Makefile
Revision: 3389
Committed: Fri Apr 25 14:12:15 2014 UTC (12 years, 2 months ago) by michael
File size: 5139 byte(s)
Log Message:
- Imported ircservices-5.1.24

File Contents

# User Rev Content
1 michael 3389 # Makefile for Services.
2     #
3     # IRC Services is copyright (c) 1996-2009 Andrew Church.
4     # E-mail: <achurch@achurch.org>
5     # Parts written by Andrew Kempe and others.
6     # This program is free but copyrighted software; see the file GPL.txt for
7     # details.
8    
9    
10     include Makefile.inc
11     TOPDIR=.
12    
13     default: all
14    
15     ###########################################################################
16     ########################## Configuration section ##########################
17    
18     # NOTE: Compilation options (CLEAN_COMPILE, etc.) are now all controlled by
19     # the configure script.
20    
21     # Add any extra flags you want here. The default line below enables
22     # warnings and debugging symbols on GCC. If you have a non-GCC compiler,
23     # you may want to comment it out or change it. ("icc" below is the Intel
24     # C compiler for Linux, which doesn't understand GCC's -W/-f options.)
25    
26     ifeq ($(CC),icc)
27     MORE_CFLAGS = -g
28     else
29     MORE_CFLAGS = -g -Wall -Wmissing-prototypes
30     endif
31    
32     ######################## End configuration section ########################
33     ###########################################################################
34    
35    
36     ifneq ($(STATIC_MODULES),)
37     CDEFS += -DSTATIC_MODULES
38     MODLIB = modules/modules.a
39     endif
40    
41     CFLAGS = $(CDEFS) $(BASE_CFLAGS) $(MORE_CFLAGS)
42    
43    
44     OBJS = actions.o channels.o commands.o compat.o conffile.o databases.o \
45     encrypt.o ignore.o init.o language.o log.o main.o memory.o \
46     messages.o misc.o modes.o modules.o process.o send.o servers.o \
47     signals.o sockets.o timeout.o users.o $(VSNPRINTF_O)
48    
49     .c.o:
50     $(CC) $(CFLAGS) -c $< -o $@
51    
52     ###########################################################################
53    
54     .PHONY: default config-check all myall myclean clean spotless distclean \
55     install instbin instmod modules languages tools
56    
57     ###########################################################################
58    
59     config-check:
60     @if ./configure -check ; then : ; else \
61     echo 'Either you have not yet run the "configure" script, or the script has been' ; \
62     echo 'updated since you last ran it. Please run "./configure" before running' ; \
63     echo '"$(MAKE)".' ; \
64     exit 1 ; \
65     fi
66    
67     all: config-check myall
68     @echo Now run \"$(MAKE) install\" to install Services.
69    
70     myall: $(PROGRAM) languages tools
71    
72     myclean:
73     rm -f *.o $(PROGRAM) version.c.old
74    
75     clean: myclean
76     $(MAKE) -C lang clean
77     $(MAKE) -C modules clean
78     $(MAKE) -C tools clean
79    
80     spotless distclean: myclean
81     $(MAKE) -C lang spotless
82     $(MAKE) -C modules spotless
83     $(MAKE) -C tools spotless
84     rm -rf config.cache config.h* configure.log conf-tmp Makefile.inc* \
85     langstrs.h version.c
86    
87     install: config-check myall myinstall
88     @echo ""
89     @echo "Don't forget to create/update your ircservices.conf and modules.conf files!"
90     @echo "See the README for details."
91     @echo ""
92    
93     myinstall: instdirs instbin instmod
94     $(MAKE) -C lang install
95     $(MAKE) -C tools install
96     $(MAKE) -C data install
97    
98     instdirs:
99     mkdir -p "$(INSTALL_PREFIX)$(BINDEST)"
100     mkdir -p "$(INSTALL_PREFIX)$(DATDEST)"
101    
102     instbin:
103     $(INSTALL_EXE) $(PROGRAM)$(EXE_SUFFIX) "$(INSTALL_PREFIX)$(BINDEST)/$(PROGRAM)$(EXE_SUFFIX)"
104    
105     ifneq ($(STATIC_MODULES),)
106     instmod:
107     else
108     instmod:
109     $(MAKE) -C modules install
110     endif
111    
112     ###########################################################################
113    
114     $(PROGRAM): $(OBJS) modules version.o
115     $(CC) $(LFLAGS) $(OBJS) version.o $(MODLIB) $(LIBS) -o $@
116    
117     ifneq ($(STATIC_MODULES),)
118     modules:
119     @$(MAKE) -C modules all-static CFLAGS="$(CFLAGS)"
120     else
121     modules:
122     @$(MAKE) -C modules all-dynamic CFLAGS="$(CFLAGS)"
123     endif
124    
125     languages:
126     @$(MAKE) -C lang CFLAGS="$(CFLAGS)"
127    
128     tools: services.h
129     @$(MAKE) -C tools CFLAGS="$(CFLAGS)"
130    
131    
132     # Catch any changes in compilation options at the top of this file or the
133     # configure output
134     $(OBJS): Makefile Makefile.inc
135    
136     $(OBJS): services.h
137    
138     actions.o: actions.c language.h modules.h timeout.h
139     channels.o: channels.c modules.h hash.h
140     commands.o: commands.c modules.h commands.h language.h
141     compat.o: compat.c
142     conffile.o: conffile.c conffile.h
143     databases.o: databases.c databases.h encrypt.h modules.h
144     encrypt.o: encrypt.c encrypt.h
145     ignore.o: ignore.c
146     init.o: init.c conffile.h databases.h messages.h modules.h \
147     language.h version.h
148     language.o: language.c language.h modules/nickserv/nickserv.h
149     log.o: log.c
150     main.o: main.c databases.h modules.h timeout.h
151     memory.o: memory.c
152     messages.o: messages.c messages.h language.h modules.h version.h \
153     modules/operserv/operserv.h
154     misc.o: misc.c
155     modes.o: modes.c
156     modules.o: modules.c modules.h conffile.h
157     process.o: process.c modules.h messages.h
158     send.o: send.c modules.h language.h
159     servers.o: servers.c modules.h hash.h
160     signals.o: signals.c
161     sockets.o: sockets.c
162     timeout.o: timeout.c timeout.h
163     users.o: users.c modules.h hash.h
164     vsnprintf.o: vsnprintf.c
165    
166    
167     services.h: config.h defs.h memory.h list-array.h log.h sockets.h \
168     send.h modes.h users.h channels.h servers.h extern.h
169     -touch $@
170    
171     version.c: $(OBJS) modules/.stamp
172     sh version.sh
173     modules/.stamp: modules
174    
175     databases.h: modules.h
176     -touch $@
177    
178     language.h: langstrs.h
179     -touch $@
180    
181     langstrs.h: lang/langstrs.h
182     cp -p lang/langstrs.h .
183    
184     .PHONY: lang/langstrs.h
185     lang/langstrs.h:
186     $(MAKE) -C lang langstrs.h
187    
188     ###########################################################################