Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/Makefile @ 28:0cd8025eebee
[/trunk] Changeset 44 by mikael
* Some more fixes.
* We can now build with GNU99 gcc extensions.
author | mikael |
---|---|
date | Mon, 28 Mar 2005 10:36:47 +0000 |
parents | e88b15cbf2de |
children | 86837ff0554c |
comparison
equal
deleted
inserted
replaced
27:77e6bd2ccde6 | 28:0cd8025eebee |
---|---|
8 # | 8 # |
9 # Environment variables: | 9 # Environment variables: |
10 # CPU optimize for the given processor. | 10 # CPU optimize for the given processor. |
11 # default = pentium | 11 # default = pentium |
12 # DEBUG=1 disable optimizations and build for debug | 12 # DEBUG=1 disable optimizations and build for debug |
13 # default = no | |
14 # GNU99=1 use GNU99 extensions | |
13 # default = no | 15 # default = no |
14 # | 16 # |
15 # Targets: | 17 # Targets: |
16 # all: build executable | 18 # all: build executable |
17 # clean: remove object files | 19 # clean: remove object files |
24 .PHONY: all clean realclean install | 26 .PHONY: all clean realclean install |
25 # dep | 27 # dep |
26 | 28 |
27 CPU ?= i386 | 29 CPU ?= i386 |
28 JCLIENT = mcabber | 30 JCLIENT = mcabber |
29 | 31 ifndef CC |
30 CC = gcc | 32 CC = gcc |
33 endif | |
31 CFLAGS = -Wall -W -pedantic | 34 CFLAGS = -Wall -W -pedantic |
32 LD = gcc | 35 LD = $(CC) |
33 LDLIBS = -lncurses -lpanel | 36 LDLIBS = -lncurses -lpanel |
34 | 37 |
35 ifeq ($(DEBUG),1) | 38 ifeq ($(DEBUG),1) |
36 CFLAGS += -O0 -g -DDEBUG=1 | 39 CFLAGS += -O0 -g -DDEBUG=1 |
37 else | 40 else |
38 CFLAGS += -O2 -mcpu=$(CPU) | 41 CFLAGS += -O2 -mcpu=$(CPU) |
39 LDFLAGS = -s | 42 LDFLAGS = -s |
43 endif | |
44 | |
45 ifeq ($(GNU99),1) | |
46 CFLAGS += -std=gnu99 -D_GNU_SOURCE | |
40 endif | 47 endif |
41 | 48 |
42 CP = cp -f | 49 CP = cp -f |
43 | 50 |
44 SOURCES = \ | 51 SOURCES = \ |
70 | 77 |
71 realclean: clean | 78 realclean: clean |
72 -$(RM) $(JCLIENT) | 79 -$(RM) $(JCLIENT) |
73 | 80 |
74 install: all | 81 install: all |
75 $(CP) $(JCLIENT) /usr/bin/$(JCLIENT) | 82 $(CP) $(JCLIENT) /usr/local/bin/$(JCLIENT) |
76 | 83 |
77 #dep: $(SOURCES) | 84 #dep: $(SOURCES) |
78 # makedepend -f- -Ylydialog -- $(CFLAGS) -- $(SOURCES) > depend | 85 # makedepend -f- -Ylydialog -- $(CFLAGS) -- $(SOURCES) > depend |
79 | 86 |
80 #-include depend | 87 #-include depend |