:pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Tue Nov 27 05:17 CET 2001
[gnokii.git] / common / Makefile
1
2 #
3 # $Id$
4 #
5 # Makefile for the GNOKII tool suite.
6 #
7 # Copyright (C) 1999 Hugh Blemings & Pavel Janík ml.
8 #               2000 Karel Zak
9 #
10
11 #
12 # For this common directory is used "subsystem.o" .o files concept.
13 #   (the list of object files to be linked together (to COMMON.o),
14 #   and other dirs is used this _one_ file (instead of all OBJS)
15 #
16
17 TOPDIR=..
18 include $(TOPDIR)/Makefile.global
19
20 OBJS =  cfgreader.o \
21         device.o \
22         gsm-ringtones.o \
23         gsm-api.o \
24         gsm-networks.o \
25         vcal.o \
26         misc.o \
27         gsm-sms.o \
28         gsm-bitmaps.o \
29         gsm-common.o \
30         gsm-encoding.o \
31         gsm-error.o \
32         gsm-statemachine.o
33
34 all: libgnokii.so gsm-filetypes.o
35
36 phones/PHONES.o:
37         $(MAKE) -C phones PHONES.o
38
39 links/LINKS.o:
40         $(MAKE) -C links LINKS.o
41
42 devices/DEVICES.o:
43         $(MAKE) -C devices DEVICES.o
44
45 libgnokii.so: $(OBJS) phones/PHONES.o links/LINKS.o devices/DEVICES.o
46         $(CC) -shared -o libgnokii.so $(OBJS) phones/PHONES.o links/LINKS.o devices/DEVICES.o
47
48 gsm-filetypes.o: gsm-filetypes.c
49         $(CC) $(CFLAGS) $(CPPFLAGS) $(XPM_CFLAGS) -c gsm-filetypes.c
50
51 vcal.c: vcal.lx
52         $(LEX) -ovcal.c vcal.lx
53
54 clean:
55         $(RM) $(OBJS) *~ depend libgnokii.so gsm-filetypes.o vcal.c phones/PHONES.o links/LINKS.o devices/DEVICES.o
56
57 install:
58         $(INSTALL) -d $(libdir)
59         $(INSTALL) libgnokii.so $(libdir)
60         @echo
61
62 depend dep:
63         $(CC) $(CFLAGS) -MM *.c >depend
64
65 ifeq (depend,$(wildcard depend))
66 include depend
67 endif
68
69
70 .PHONY: all install clean dep depend
71