ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/src/Makefile.in
Revision: 1.12
Committed: Sat Sep 22 14:27:30 2007 UTC (16 years, 8 months ago) by pippijn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +15 -19 lines
Log Message:
split up ermyth into ermyth-modules, libermyth (currently just ermyth-util) and ermyth-core

File Contents

# User Rev Content
1 pippijn 1.12 # Makefile.in: This file contains build instructions.
2     #
3 pippijn 1.1 # Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team
4 pippijn 1.12 # Rights to this code are as documented in COPYING.
5     #
6     #
7     # Portions of this file were derived from sources bearing the following license:
8 pippijn 1.1 # Copyright © 2005 Atheme Development Group
9 pippijn 1.2 # Rights to this code are documented in doc/pod/license.pod.
10 pippijn 1.1 #
11 pippijn 1.12 # $Id: Makefile.in,v 1.11 2007-09-16 18:54:44 pippijn Exp $
12 pippijn 1.1 #
13    
14     CXX = @CXX@
15     RM = @RM@
16     MV = @MV@
17     CP = @CP@
18     INSTALL = @INSTALL@
19     prefix = @prefix@
20     exec_prefix = @exec_prefix@
21     datarootdir = @datarootdir@
22     bindir = @bindir@
23     datadir = @datadir@
24     sysconfdir = @sysconfdir@
25     libdir = @libdir@
26     sbindir = @sbindir@
27     localstatedir = @localstatedir@
28     DOCDIR = @DOCDIR@
29     MODDIR = @MODDIR@
30     DATADIR = @DATADIR@
31     RUNDIR = @RUNDIR@
32     LOGDIR = @LOGDIR@
33     SHAREDIR = @SHAREDIR@
34     BIN = @PACKAGE_NAME@@EXEEXT@
35     LIB = lib@PACKAGE_NAME@.so
36     MKDEP = @MKDEP@
37 pippijn 1.12 CXXFLAGS = @CXXFLAGS@ -I../include -DBINDIR=\"$(bindir)\" -I../libermyth/include
38 pippijn 1.1 PICFLAGS = @PICFLAGS@
39    
40     VERSION = @PACKAGE_VERSION@
41    
42 pippijn 1.12 # Want absolute paths?
43     SRCDIR = .
44     @ABSPATHS@SRCDIR= @SRCDIR@/src
45    
46     LIBS = @LIBS@ -L${SRCDIR}/../libermyth -lsvsutil
47 pippijn 1.1 LDFLAGS = @LDFLAGS@ @LTLIBINTL@
48     RPATH = @RPATH@
49     CPPFLAGS = @CPPFLAGS@
50     SOCKET_ENGINE = @SOCKET_ENGINE@.C
51    
52     default: all
53    
54     ACCOUNT_SRCS = \
55     $(SRCDIR)/account.C \
56     $(SRCDIR)/account/chanacs.C \
57     $(SRCDIR)/account/metadata.C \
58     $(SRCDIR)/account/mychan.C \
59     $(SRCDIR)/account/mynick.C \
60     $(SRCDIR)/account/myuser.C
61    
62     LIB_SRCS = \
63     $(SRCDIR)/authcookie.C \
64     $(SRCDIR)/channels.C \
65     $(SRCDIR)/cidr.C \
66     $(SRCDIR)/cmode.C \
67     $(SRCDIR)/commandtree.C \
68     $(SRCDIR)/ctcp-common.C \
69     $(SRCDIR)/conf.C \
70     $(SRCDIR)/confparse.C \
71     $(SRCDIR)/connection.C \
72     $(SRCDIR)/crypto.C \
73     $(SRCDIR)/datastream.C \
74     $(SRCDIR)/dlink.C \
75     $(SRCDIR)/event.C \
76     $(SRCDIR)/flags.C \
77     $(SRCDIR)/function.C \
78     $(SRCDIR)/global.C \
79     $(SRCDIR)/help.C \
80     $(SRCDIR)/logger.C \
81     $(SRCDIR)/match.C \
82     $(SRCDIR)/module.C \
83     $(SRCDIR)/node.C \
84     $(SRCDIR)/object.C \
85     $(SRCDIR)/packet.C \
86     $(SRCDIR)/parse.C \
87     $(SRCDIR)/phandler.C \
88     $(SRCDIR)/pmodule.C \
89     $(SRCDIR)/privs.C \
90     $(SRCDIR)/ptasks.C \
91     $(SRCDIR)/send.C \
92     $(SRCDIR)/servers.C \
93     $(SRCDIR)/services.C \
94     $(SRCDIR)/servtree.C \
95     $(SRCDIR)/signal.C \
96     $(SRCDIR)/svsignore.C \
97     $(SRCDIR)/table.C \
98     $(SRCDIR)/template.C \
99     $(SRCDIR)/tokenize.C \
100     $(SRCDIR)/ubase64.C \
101     $(SRCDIR)/uid.C \
102     $(SRCDIR)/uplink.C \
103 pippijn 1.10 $(SRCDIR)/users.C \
104 pippijn 1.1 $(SRCDIR)/${SOCKET_ENGINE}
105    
106 pippijn 1.5 SRCS = ${ACCOUNT_SRCS} ${LIB_SRCS} $(SRCDIR)/version.C
107 pippijn 1.1
108     OBJS = ${SRCS:.C=.o}
109    
110 pippijn 1.12 all: ${BIN} ../dist/ermyth.conf.userserv
111 pippijn 1.1
112     build: all
113    
114     ${BIN}: main.C ${LIB}
115     @echo " LD $@"
116 pippijn 1.12 @${CXX} -L${SRCDIR} -L${SRCDIR}/../modules -l@PACKAGE_NAME@ -lservices ${CXXFLAGS} ${LIBS} ${LDFLAGS} main.C ${SRCDIR}/../libermyth/common.C -o $@
117 pippijn 1.1
118     ${LIB}: $(OBJS)
119     @echo " LD $@"
120     @${CXX} ${PICFLAGS} ${OBJS} ${LIBS} ${LDFLAGS} -o $@
121     @$(MV) version.C version.C.last
122    
123 pippijn 1.11 ../dist/ermyth.conf.userserv: ../dist/ermyth.conf.example
124     (echo '/* ermyth.conf.userserv, autogenerated from ermyth.conf.example */'; \
125 pippijn 1.1 sed -e 's@loadmodule "modules/nickserv/identify";@#&@' \
126     -e 's@loadmodule "modules/nickserv/ghost";@#&@' \
127     -e 's@#loadmodule "modules/nickserv/login";@loadmodule "modules/nickserv/login";@' \
128     -e 's/spam;/#spam;/' \
129     -e 's/#no_nick_ownership;/no_nick_ownership;/' \
130     -e 's/nick = "NickServ";/nick = "UserServ";/' \
131     -e 's/user = "NickServ";/user = "UserServ";/' \
132 pippijn 1.11 -e 's/real = "Nickname Services";/real = "User Registration Services";/' ../dist/ermyth.conf.example) >../dist/ermyth.conf.userserv
133 pippijn 1.1
134     install: build
135     $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)
136     $(INSTALL) -m 755 -d $(DESTDIR)$(localstatedir)
137     $(INSTALL) -m 755 -d $(DESTDIR)$(LOGDIR)
138     $(INSTALL) -m 755 -d $(DESTDIR)$(RUNDIR)
139     $(INSTALL) -m 755 -d $(DESTDIR)$(DATADIR)
140     $(INSTALL) -m 755 -c $(BIN) $(DESTDIR)$(bindir)
141     $(INSTALL) -m 755 -c $(LIB) $(DESTDIR)$(bindir)
142 pippijn 1.11 $(INSTALL) -m 640 -c ../dist/ermyth.conf.example $(DESTDIR)$(sysconfdir)
143     $(INSTALL) -m 640 -c ../dist/ermyth.motd.example $(DESTDIR)$(sysconfdir)
144     $(INSTALL) -m 640 -c ../dist/ermyth.conf.userserv $(DESTDIR)$(sysconfdir)
145     $(INSTALL) -m 640 -c ../dist/ermyth.cron.example $(DESTDIR)$(sysconfdir)
146 pippijn 1.1
147     @echo "----------------------------------------------------------------"
148     @echo ">>> Remember to cd to ${prefix} and edit your config file.";
149     @echo "----------------------------------------------------------------"
150    
151     #deinstall:
152     # if [ -d ${prefix} ] ; then \
153     # $(RM) -rf ${prefix}; \
154     # fi
155    
156     $(SRCDIR)/version.C:
157     @/bin/sh ./version.sh $(VERSION)
158    
159     .C.o:
160     @echo " CC $@"
161     @${CXX} ${PICFLAGS} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
162    
163     .PHONY: depend clean distclean
164     # This sed command sucks but I don't know a better way -- jilles
165     depend:
166     @${MKDEP} ${PICFLAGS} ${CPPFLAGS} ${CXXFLAGS} ${LIB_SRCS} | sed -e 's|\([^.]*\.o\):|$(SRCDIR)/\1:|' > .depend
167 pippijn 1.5 @${MKDEP} ${PICFLAGS} ${CPPFLAGS} ${CXXFLAGS} ${ACCOUNT_SRCS} | sed -e 's|\([^.]*\.o\):|$(SRCDIR)/account/\1:|' >> .depend
168 pippijn 1.1
169     clean:
170 pippijn 1.11 @${RM} -f ${OBJS} *.exe *~ version.C ${BIN}.core core ${LIB} ${BIN} ../dist/ermyth.conf.userserv
171 pippijn 1.1
172     distclean: clean
173     @${RM} -f Makefile version.C.last .depend
174    
175     maintainer-clean: distclean
176    
177     include .depend