]>
Commit | Line | Data |
---|---|---|
1 | # $Id: Makefile.in 6 2005-09-10 01:02:21Z nenolod $ | |
2 | ||
3 | CC = @CC@ | |
4 | INSTALL = @INSTALL@ | |
5 | INSTALL_BIN = @INSTALL_PROGRAM@ | |
6 | INSTALL_DATA = @INSTALL_DATA@ | |
7 | INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755 | |
8 | RM = @RM@ | |
9 | LEX = @LEX@ | |
10 | LEXLIB = @LEXLIB@ | |
11 | CFLAGS = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\" | |
12 | LDFLAGS = @LDFLAGS@ | |
13 | MKDEP = @MKDEP@ -DIRCD_PREFIX=\"@prefix@\" | |
14 | MV = @MV@ | |
15 | RM = @RM@ | |
16 | LN = @LN@ | |
17 | ||
18 | PROGRAM_PREFIX = @PROGRAM_PREFIX@ | |
19 | ||
20 | IRCDLIBS = -L../libratbox/src/.libs -lratbox @LIBS@ | |
21 | INCLUDES = -I../include -I../libratbox/include | |
22 | CPPFLAGS = ${INCLUDES} @CPPFLAGS@ | |
23 | ||
24 | prefix = @prefix@ | |
25 | exec_prefix = @exec_prefix@ | |
26 | bindir = @bindir@ | |
27 | libdir = @libdir@ | |
28 | libexecdir = @libexecdir@ | |
29 | confdir = @confdir@ | |
30 | localstatedir = @localstatedir@ | |
31 | ||
32 | PROGS = viconf mkpasswd convertilines convertklines genssl.sh | |
33 | ||
34 | all: $(PROGS) | |
35 | ||
36 | build: all | |
37 | ||
38 | mkpasswd: mkpasswd.c | |
39 | $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) mkpasswd.c -o mkpasswd $(IRCDLIBS) | |
40 | ||
41 | viconf: viconf.c ../include/setup.h ../include/config.h | |
42 | $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) viconf.c -o viconf $(IRCDLIBS) | |
43 | ||
44 | convertilines: convertilines.c | |
45 | $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) convertilines.c -o convertilines $(IRCDLIBS) | |
46 | ||
47 | convertklines: convertklines.c | |
48 | $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) convertklines.c -o convertklines $(IRCDLIBS) | |
49 | ||
50 | genssl.sh: genssl.sh.in | |
51 | cd .. && ./config.status tools/genssl.sh && ./config.status tools/genssl.sh_chmod | |
52 | ||
53 | clean: | |
54 | $(RM) -f encspeed viconf chkconf mkpasswd *~ core *.exe convertklines convertilines | |
55 | ||
56 | distclean: clean | |
57 | $(RM) -f genssl.sh Makefile | |
58 | ||
59 | lint: | |
60 | lint -aacgprxhH $(CPPFLAGS) -DIRCD_PREFIX=\"@prefix@\" $(convertklines_SOURCES) $(mkpasswd_SOURCES) $(viconf_SOURCES) $(encspeed_SOURCES) >>../lint.out | |
61 | ||
62 | depend: | |
63 | ||
64 | .c.o: | |
65 | $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c $< | |
66 | ||
67 | # DO NOT DELETE | |
68 | ||
69 | prefix = @prefix@ | |
70 | exec_prefix = @exec_prefix@ | |
71 | exec_suffix = @exec_suffix@ | |
72 | bindir = @bindir@ | |
73 | libexecdir = @libexecdir@ | |
74 | confdir = @confdir@ | |
75 | localstatedir = @localstatedir@ | |
76 | # Change this later! -- adrian | |
77 | moduledir = @moduledir@ | |
78 | automoduledir = @moduledir@/autoload | |
79 | ||
80 | ||
81 | ||
82 | install-mkdirs: | |
83 | -@if test ! -d $(DESTDIR)$(prefix); then \ | |
84 | echo "ircd: setting up tools directory structure"; \ | |
85 | mkdir $(DESTDIR)$(prefix); \ | |
86 | fi | |
87 | -@if test ! -d $(DESTDIR)$(exec_prefix); then \ | |
88 | mkdir $(DESTDIR)$(exec_prefix); \ | |
89 | fi | |
90 | -@if test ! -d $(DESTDIR)$(bindir); then \ | |
91 | mkdir $(DESTDIR)$(bindir); \ | |
92 | fi | |
93 | ||
94 | install: install-mkdirs build | |
95 | @echo "ircd: installing tools ($(PROGS))" | |
96 | @for i in $(PROGS); do \ | |
97 | if test -f $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i; then \ | |
98 | $(MV) $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i.old; \ | |
99 | fi; \ | |
100 | $(INSTALL_BIN) $$i $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i; \ | |
101 | done; \ | |
102 | $(RM) -f $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)vimotd | |
103 | $(LN) $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)viconf $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)vimotd | |
104 |