source: Makefile @ 21d09ac

Last change on this file since 21d09ac was 576d6d7, checked in by Wilmer van der Gaast <wilmer@…>, at 2005-11-07T18:39:57Z

Got rid of some debugging code we tried to use to track the 100% CPU bug.
Turned out it was very suitable DoS code. :-)

  • Property mode set to 100644
File size: 2.7 KB
Line 
1###########################
2## Makefile for BitlBee  ##
3##                       ##
4## Copyright 2002 Lintux ##
5###########################
6
7### DEFINITIONS
8
9-include Makefile.settings
10
11# Program variables
12objects = account.o bitlbee.o commands.o conf.o crypting.o help.o ini.o irc.o log.o nick.o query.o set.o unix.o url.o user.o
13subdirs = protocols
14
15# Expansion of variables
16subdirobjs = $(foreach dir,$(subdirs),$(dir)/$(dir).o)
17CFLAGS += -Wall
18
19all: $(OUTFILE)
20
21uninstall: uninstall-bin uninstall-doc
22        @echo -e '\nmake uninstall does not remove files in '$(DESTDIR)$(ETCDIR)', you can use make uninstall-etc to do that.\n'
23
24install: install-bin install-doc
25        @if ! [ -d $(DESTDIR)$(CONFIG) ]; then echo -e '\nThe configuration directory $(DESTDIR)$(CONFIG) does not exist yet, don'\''t forget to create it!'; fi
26        @if ! [ -e $(DESTDIR)$(ETCDIR)/bitlbee.conf ]; then echo -e '\nNo files are installed in '$(DESTDIR)$(ETCDIR)' by make install. Run make install-etc to do that.'; fi
27        @echo
28
29.PHONY:   install   install-bin   install-etc   install-doc \
30        uninstall uninstall-bin uninstall-etc uninstall-doc \
31        all clean distclean tar $(subdirs)
32
33Makefile.settings:
34        @echo
35        @echo Run ./configure to create Makefile.settings, then rerun make
36        @echo
37
38clean: $(subdirs)
39        rm -f *.o $(OUTFILE) core utils/bitlbeed encode decode
40
41distclean: clean $(subdirs)
42        rm -f Makefile.settings config.h
43        find . -name 'DEADJOE' -o -name '*.orig' -o -name '*.rej' -o -name '*~' | xargs rm -f
44
45install-doc:
46        $(MAKE) -C doc install
47
48uninstall-doc:
49        $(MAKE) -C doc uninstall
50
51install-bin:
52        mkdir -p $(DESTDIR)$(BINDIR)
53        install -m 0755 $(OUTFILE) $(DESTDIR)$(BINDIR)/$(OUTFILE)
54
55uninstall-bin:
56        rm -f $(DESTDIR)$(BINDIR)/$(OUTFILE)
57
58install-etc:
59        mkdir -p $(DESTDIR)$(ETCDIR)
60        install -m 0644 motd.txt $(DESTDIR)$(ETCDIR)/motd.txt
61        install -m 0644 bitlbee.conf $(DESTDIR)$(ETCDIR)/bitlbee.conf
62
63uninstall-etc:
64        rm -f $(DESTDIR)$(ETCDIR)/motd.txt
65        rm -f $(DESTDIR)$(ETCDIR)/bitlbee.conf
66        -rmdir $(DESTDIR)$(ETCDIR)
67
68tar:
69        fakeroot debian/rules clean || make distclean
70        x=$$(basename $$(pwd)); \
71        cd ..; \
72        tar czf $$x.tar.gz --exclude=debian --exclude=.bzr $$x
73
74$(subdirs):
75        @$(MAKE) -C $@ $(MAKECMDGOALS)
76
77$(objects): %.o: %.c
78        @echo '*' Compiling $<
79        @$(CC) -c $(CFLAGS) $< -o $@
80
81$(objects): Makefile Makefile.settings config.h
82
83$(OUTFILE): $(objects) $(subdirs)
84        @echo '*' Linking $(OUTFILE)
85        @$(CC) $(objects) $(subdirobjs) -o $(OUTFILE) $(LFLAGS) $(EFLAGS)
86ifndef DEBUG
87        @echo '*' Stripping $(OUTFILE)
88        @-$(STRIP) $(OUTFILE)
89endif
90
91encode: crypting.c
92        $(CC) crypting.c protocols/md5.c $(CFLAGS) -o encode -DCRYPTING_MAIN $(CFLAGS) $(EFLAGS) $(LFLAGS)
93
94decode: encode
95        cp encode decode
96
97ctags: 
98        ctags `find . -name "*.c"` `find . -name "*.h"`
Note: See TracBrowser for help on using the repository browser.