Found in "gnokii-working" directory, some November-patches version
[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         at-hw.o \
24         cimd.o \
25         gsm-api.o \
26         gsm-networks.o \
27         vcal.o \
28         misc.o \
29         gsm-bitmaps.o \
30         gsm-common.o \
31         gsm-encoding.o \
32         gsm-statemachine.o
33 #        gsm-sms.o \
34
35 all: libgnokii.a gsm-filetypes.o
36
37 phones/PHONES.o:
38         $(MAKE) -C phones PHONES.o
39
40 links/LINKS.o:
41         $(MAKE) -C links LINKS.o
42
43 devices/DEVICES.o:
44         $(MAKE) -C devices DEVICES.o
45
46 libgnokii.a: $(OBJS) phones/PHONES.o links/LINKS.o devices/DEVICES.o
47         ar rcs $@ $^
48 #       $(CC) -shared -o libgnokii.so $(OBJS) phones/PHONES.o links/LINKS.o devices/DEVICES.o
49
50 gsm-filetypes.o: gsm-filetypes.c
51         $(CC) $(CFLAGS) $(CPPFLAGS) $(XPM_CFLAGS) -c gsm-filetypes.c
52
53 vcal.c: vcal.lx
54         $(LEX) -ovcal.c vcal.lx
55
56 clean:
57         $(RM) $(OBJS) *~ depend COMMON.o gsm-filetypes.o vcal.c phones/PHONES.o links/LINKS.o devices/DEVICES.o *.a
58
59 install:
60         $(INSTALL) -d $(libdir)
61         $(INSTALL) libgnokii.so $(libdir)
62         @echo
63
64 depend dep:
65         $(CC) $(CFLAGS) -MM *.c >depend
66
67 ifeq (depend,$(wildcard depend))
68 include depend
69 endif
70
71
72 .PHONY: all install clean dep depend
73