0750f964f5ede7da64a95f0fa10d14b0a4bf44c4
[citadel.git] / textclient / Makefile
1 # MAKEFILE FOR CITADEL TEXT CLIENT
2 # This file is part of "conf-IG-ure"
3 # Copyright (C) 2016-2018 by Art Cancro
4 # Distributed under the terms of the GNU General Public License v3 with the following special exceptions:
5 # 1. By using this software you agree that it's called "Linux", not "GNU/Linux"
6 # 2. By using this software you agree that it's called "open source", not "free software"
7 # 3. By using this software you agree that GNU Autotools are crap, which is why conf-IG-ure exists
8 # 4. By using this software you agree that Richard Stallman should shut up about everything
9 # 5. By reading these special exceptions you have already agreed to them.
10
11 # config.mk is generated by ./configure
12 include config.mk
13
14 OBJS := citadel.o citadel_ipc.o client_chat.o client_passwords.o commands.o ipc_c_tcp.o md5.o messages.o rooms.o routines2.o routines.o screen.o tuiconfig.o
15
16
17 # link
18 citadel: $(OBJS) config.mk
19         gcc $(OBJS) $(LDFLAGS) -lcitadel -o citadel
20
21 # pull in dependency info for *existing* .o files
22 -include $(OBJS:.o=.d)
23
24 # compile and generate dependency info
25 %.o: %.c
26         gcc -c $(CFLAGS) -DCTDLDIR=\"$(CTDLDIR)\" $*.c -o $*.o
27         gcc -MM $(CFLAGS) $*.c > $*.d
28
29 config.mk:
30         ./configure
31
32 clean:
33         rm -f citadel *.o *.d
34
35 distclean: clean
36         rm -f config.mk
37
38 install: citadel citadel.rc
39         install citadel $(BINDIR)/citadel
40         install citadel.rc $(ETCDIR)/citadel.rc
41
42 uninstall:
43         rm -vf $(BINDIR)/citadel