Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/Makefile.mcabber @ 55:39fd2f53f035
[/trunk] Changeset 70 by mikael
Makefile has been renamed.
author | mikael |
---|---|
date | Wed, 06 Apr 2005 12:25:54 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
54:563f0deea6a3 | 55:39fd2f53f035 |
---|---|
1 # | |
2 # mcabber Makefile | |
3 # | |
4 | |
5 | |
6 # | |
7 # Available options: | |
8 # | |
9 # Environment variables: | |
10 # CPU optimize for the given processor. | |
11 # default = pentium | |
12 # DEBUG=1 disable optimizations and build for debug | |
13 # default = no | |
14 # GNU99=1 use GNU99 extensions | |
15 # default = no | |
16 # | |
17 # Targets: | |
18 # all: build executable | |
19 # clean: remove object files | |
20 # realclean: remove all generated files | |
21 # install: build & install | |
22 # dep: create dependencies | |
23 # | |
24 | |
25 | |
26 .PHONY: all clean realclean install | |
27 # dep | |
28 | |
29 CPU ?= i386 | |
30 JCLIENT = mcabber | |
31 ifndef CC | |
32 CC = gcc | |
33 endif | |
34 CFLAGS = -Wall -W -pedantic | |
35 LD = $(CC) | |
36 LDLIBS = -lncurses -lpanel -lssl -L../libjabber -L../connwrap -llibjabber -lconnwrap | |
37 | |
38 ifeq ($(DEBUG),1) | |
39 CFLAGS += -O0 -g -DDEBUG=1 | |
40 else | |
41 CFLAGS += -O2 -mcpu=$(CPU) | |
42 LDFLAGS = -s | |
43 endif | |
44 | |
45 ifeq ($(GNU99),1) | |
46 CFLAGS += -std=gnu99 -D_GNU_SOURCE | |
47 endif | |
48 | |
49 CP = cp -f | |
50 | |
51 SOURCES = \ | |
52 main.c \ | |
53 commands.c \ | |
54 screen.c \ | |
55 utils.c \ | |
56 buddies.c \ | |
57 parsecfg.c \ | |
58 jabglue.c \ | |
59 lang.c \ | |
60 utf8.c | |
61 | |
62 OBJECTS = $(SOURCES:.c=.o) | |
63 | |
64 .c.o: | |
65 $(CC) -o $@ $(CFLAGS) -c $< | |
66 | |
67 all: $(JCLIENT) | |
68 | |
69 $(JCLIENT): $(OBJECTS) | |
70 $(LD) -o $@ $(LDFLAGS) $^ $(LDLIBS) | |
71 | |
72 clean: | |
73 -$(RM) *~ | |
74 -$(RM) $(JCLIENT) | |
75 -$(RM) $(OBJECTS) | |
76 # -$(RM) depend | |
77 | |
78 realclean: clean | |
79 -$(RM) $(JCLIENT) | |
80 | |
81 install: all | |
82 $(CP) $(JCLIENT) /usr/local/bin/$(JCLIENT) | |
83 | |
84 #dep: $(SOURCES) | |
85 # makedepend -f- -Ylydialog -- $(CFLAGS) -- $(SOURCES) > depend | |
86 | |
87 #-include depend |