comparison mcabber/Makefile @ 0:b3b2332715fb

Tailorization of /trunk Import of the upstream sources from Repository: file:///tmp/svn-mcabber Module: /trunk Revision: 15
author tailor@frmp8452
date Thu, 30 Jun 2005 21:39:31 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b3b2332715fb
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 #
15 # Targets:
16 # all: build executable
17 # clean: remove object files
18 # realclean: remove all generated files
19 # install: build & install
20 # dep: create dependencies
21 #
22
23
24 .PHONY: all clean realclean install
25 # dep
26
27 CPU ?= i386
28 JCLIENT = mcabber
29
30 CC = gcc
31 CFLAGS = -Wall -W -pedantic
32 LD = gcc
33 LDLIBS = -lncurses -lpanel
34
35 ifeq ($(DEBUG),1)
36 CFLAGS += -O0 -g -DDEBUG=1
37 else
38 CFLAGS += -O2 -mcpu=$(CPU)
39 LDFLAGS = -s
40 endif
41
42 CP = cp -f
43
44 SOURCES = \
45 main.c \
46 screen.c \
47 utils.c \
48 buddies.c \
49 parsecfg.c \
50 server.c \
51 socket.c \
52 lang.c \
53 utf8.c
54
55 OBJECTS = $(SOURCES:.c=.o)
56
57 .c.o:
58 $(CC) -o $@ $(CFLAGS) -c $<
59
60 all: $(JCLIENT)
61
62 $(JCLIENT): $(OBJECTS)
63 $(LD) -o $@ $(LDFLAGS) $^ $(LDLIBS)
64
65 clean:
66 -$(RM) *~
67 -$(RM) $(JCLIENT)
68 -$(RM) $(OBJECTS)
69 # -$(RM) depend
70
71 realclean: clean
72 -$(RM) $(JCLIENT)
73
74 install: all
75 $(CP) $(JCLIENT) /usr/bin/$(JCLIENT)
76
77 #dep: $(SOURCES)
78 # makedepend -f- -Ylydialog -- $(CFLAGS) -- $(SOURCES) > depend
79
80 #-include depend