-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
178 lines (163 loc) · 4.81 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#************************************************************************
#* IRC - Internet Relay Chat, Makefile
#* Copyright (C) 1990, Jarkko Oikarinen
#*
#* This program is free software; you can redistribute it and/or modify
#* it under the terms of the GNU General Public License as published by
#* the Free Software Foundation; either version 1, or (at your option)
#* any later version.
#*
#* This program is distributed in the hope that it will be useful,
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#* GNU General Public License for more details.
#*
#* You should have received a copy of the GNU General Public License
#* along with this program; if not, write to the Free Software
#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#*
#* $Id: Makefile.in 33 2010-05-10 02:46:01Z openglx $
#*/
RM=@RM@
# Default CFLAGS
CFLAGS = -g -O2 -DNDEBUG
# Default make flags - you may want to uncomment this on a multicpu machine
#MFLAGS = -j 4
#
# For developers
# CFLAGS= -g -ggdb -Wall -Wunused -Wshadow -Wmissing-declarations
#
# You may need to define the FD_SETSIZE in order to overrule
# the system one.
#CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024"
#
# NOTE: The rest of these definitions may or may not work, I haven't tested them --JRL
#
# use the following on MIPS:
#CFLAGS= -DNDEBUG -systype bsd43 -DSYSTYPE_BSD43
# For Irix 4.x (SGI), use the following:
#CFLAGS= -DNDEBUG -g -cckr
#
# on NEXT use:
#CFLAGS= -DNDEBUG -bsd
#on NeXT other than 2.0:
#IRCDLIBS= -lsys_s
#
# AIX 370 flags
#CFLAGS= -DNDEBUG -D_BSD -Hxa
#IRCDLIBS= -lbsd
#
# Dynix/ptx V2.0.x
#CFLAGS= -DNDEBUG -O -Xo
#IRCDLIBS= -lsocket -linet -lnsl -lseq
#
# Dynix/ptx V1.x.x
#IRCDLIBS= -lsocket -linet -lnsl -lseq
#
#use the following on SUN OS without nameserver libraries inside libc
#IRCDLIBS=-lresolv
#
# ESIX
#CFLAGS= -DNDEBUG -O -I/usr/ucbinclude
#IRCDLIBS=-L/usr/ucblib -L/usr/lib -lsocket -lucb -lns -lnsl
#
# LDFLAGS - flags to send the loader (ld). SunOS users may want to add
# -Bstatic here.
#
#LDFLAGS=-Bstatic
#
#Dell SVR4
#CC=gcc
#CFLAGS= -DNDEBUG -O2
#IRCDLIBS=-lsocket -lnsl -lucb
#IRCLIBS=-lcurses -lresolv -lsocket -lnsl -lucb
# Where is your openssl binary
OPENSSLPATH=@OPENSSLPATH@
SHELL=/bin/sh
SUBDIRS=@ADNS@ src tools
MAKE = make ${MFLAGS} 'CFLAGS=${CFLAGS}' 'INSTALL=${INSTALL}' 'LDFLAGS=${LDFLAGS}'
all: build
-@if [ -f /etc/setup/cygwin.lst.gz ]; then \
echo "Now type 'tools/install_ircd' ."; \
else \
echo "Now type 'make install' ."; \
fi
autoconf: autoconf/configure.in
autoconf autoconf/configure.in >configure
autoheader autoconf/configure.in
${RM} -f config.cache
build:
-@if [ ! -f include/setup.h ] ; then \
echo "Hmm...doesn't look like you've run configure..."; \
echo "Doing so now."; \
sh configure; \
fi
@for i in $(SUBDIRS); do \
echo "Building $$i";\
cd $$i;\
${MAKE} build; cd ..;\
done
help2html:
-@if [ ! -f include/setup.h ] ; then \
echo "Hmm...doesn't look like you've run configure..."; \
echo "Doing so now."; \
sh configure; \
fi
cd src; make help2html; cd ..
clean:
${RM} -f *~ core
@for i in $(SUBDIRS); do \
echo "Cleaning $$i";\
cd $$i;\
${MAKE} clean; cd ..;\
done
-@if [ -f include/setup.h ] ; then \
echo "To really restart installation, make distclean" ; \
fi
distclean:
${RM} -f Makefile *~ *.rej *.orig core ircd.core doc/*~ samples/*~
${RM} -f config.status config.cache config.log DEADJOE
cd include; ${RM} -f path.h setup.h *~ *.rej *.orig ; cd ..
@for i in $(SUBDIRS); do \
echo "Cleaning $$i";\
cd $$i;\
${MAKE} distclean; cd ..;\
done
depend:
@for i in $(SUBDIRS); do \
echo "Making dependencies in $$i";\
cd $$i;\
${MAKE} depend; cd ..;\
done
lint:
@for i in $(SUBDIRS); do \
echo "lint'ing in $$i";\
cd $$i;\
${MAKE} lint; cd ..;\
done
pem: src/ssl.cnf
@echo "Generating certificate request .. "
$(OPENSSLPATH) req -new \
-config src/ssl.cnf -out server.req.pem \
-keyout server.key.pem -nodes
@echo "Generating self-signed certificate .. "
$(OPENSSLPATH) req -x509 -days 365 -in server.req.pem \
-key server.key.pem -out server.cert.pem
@echo "Generating fingerprint .."
$(OPENSSLPATH) x509 -subject -dates -fingerprint -noout \
-in server.cert.pem
@echo "Setting o-rwx & g-rwx for files... "
chmod o-rwx server.req.pem server.key.pem server.cert.pem
chmod g-rwx server.req.pem server.key.pem server.cert.pem
@echo "Done!. If you want to encrypt the private key, run"
@echo "make encpem"
encpem: server.key.pem
@echo "Encrypting server key .."
$(OPENSSLPATH) rsa -in server.key.pem -out server.key.c.pem -des3
-@if [ -f server.key.c.pem ] ; then \
echo "Replacing unencrypted with encrypted .." ; \
cp server.key.c.pem server.key.pem ; \
rm -f server.key.c.pem ; \
fi
install:
@./tools/install_ircd