annotate 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
rev   line source
0
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
1 #
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
2 # mcabber Makefile
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
3 #
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
4
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
5
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
6 #
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
7 # Available options:
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
8 #
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
9 # Environment variables:
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
10 # CPU optimize for the given processor.
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
11 # default = pentium
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
12 # DEBUG=1 disable optimizations and build for debug
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
13 # default = no
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
14 #
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
15 # Targets:
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
16 # all: build executable
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
17 # clean: remove object files
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
18 # realclean: remove all generated files
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
19 # install: build & install
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
20 # dep: create dependencies
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
21 #
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
22
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
23
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
24 .PHONY: all clean realclean install
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
25 # dep
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
26
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
27 CPU ?= i386
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
28 JCLIENT = mcabber
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
29
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
30 CC = gcc
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
31 CFLAGS = -Wall -W -pedantic
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
32 LD = gcc
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
33 LDLIBS = -lncurses -lpanel
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
34
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
35 ifeq ($(DEBUG),1)
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
36 CFLAGS += -O0 -g -DDEBUG=1
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
37 else
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
38 CFLAGS += -O2 -mcpu=$(CPU)
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
39 LDFLAGS = -s
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
40 endif
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
41
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
42 CP = cp -f
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
43
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
44 SOURCES = \
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
45 main.c \
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
46 screen.c \
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
47 utils.c \
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
48 buddies.c \
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
49 parsecfg.c \
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
50 server.c \
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
51 socket.c \
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
52 lang.c \
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
53 utf8.c
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
54
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
55 OBJECTS = $(SOURCES:.c=.o)
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
56
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
57 .c.o:
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
58 $(CC) -o $@ $(CFLAGS) -c $<
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
59
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
60 all: $(JCLIENT)
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
61
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
62 $(JCLIENT): $(OBJECTS)
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
63 $(LD) -o $@ $(LDFLAGS) $^ $(LDLIBS)
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
64
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
65 clean:
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
66 -$(RM) *~
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
67 -$(RM) $(JCLIENT)
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
68 -$(RM) $(OBJECTS)
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
69 # -$(RM) depend
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
70
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
71 realclean: clean
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
72 -$(RM) $(JCLIENT)
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
73
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
74 install: all
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
75 $(CP) $(JCLIENT) /usr/bin/$(JCLIENT)
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
76
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
77 #dep: $(SOURCES)
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
78 # makedepend -f- -Ylydialog -- $(CFLAGS) -- $(SOURCES) > depend
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
79
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
80 #-include depend