source: Makefile @ f32d557

Last change on this file since f32d557 was f32d557, checked in by Jelmer Vernooij <jelmer@…>, at 2006-03-24T15:53:29Z

Switch from LDB to LDAP (LDB's authentication subsystem is not mature enough yet)

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