Sorted non-stripped n6110.c reqd modules to the end of the commented list
[gnokii.git] / common / Makefile
1
2 #
3 # Makefile for the GNOKII tool suite.
4 #
5
6 #
7 # For this common directory is used "subsystem.o" .o files concept.
8 #   (the list of object files to be linked together (to COMMON.o),
9 #   and other dirs is used this _one_ file (instead of all OBJS)
10 #
11
12 TOPDIR=..
13 include $(TOPDIR)/Makefile.global
14
15 CFLAGS += $(PTHREAD_CFLAGS)
16
17 DIRS =          protocol \
18                 oldmodules \
19                 newmodules
20
21 #       files/midifile.o \
22 #       gsm-wap.o \
23 #       gsm-calendar.o \
24 #       protocol/fbusirda.o \
25 #       protocol/mbus.o \
26 #       protocol/at.o \
27 #       newmodules/n7110.o
28 #       newmodules/sniff/sniff.o \
29 #       newmodules/newat.o \
30 #       gsm-phonebook.o \
31 #       gsm-bitmaps.o \
32 #       gsm-networks.o \
33 #       gsm-coding.o \
34 #       gsm-sms.o \
35 #       gsm-ringtones.o \
36
37 OBJS =  devices/device.o \
38         data/rlp-common.o \
39         data/rlp-crc24.o \
40         gsm-datetime.o \
41         gsm-api.o \
42         files/cfgreader.o \
43         misc.o \
44         protocol/fbus.o \
45         newmodules/n6110.o
46
47 DATA_OBJS = data/virtmodem.o \
48         data/at-emulator.o \
49         data/datapump.o
50
51 ifdef WIN32
52         OBJS += $(TOPDIR)/win32/winserial.o
53 else
54         OBJS += devices/unixserial.o
55 #               devices/unixirda.o \
56 #               devices/tekram.o
57 endif
58
59 ifdef XPM_CFLAGS
60     CFLAGS += $(XPM_CFLAGS)
61 endif
62
63 all: common.a data.a ##gsm-filetypes.o
64
65 common.a: $(OBJS)
66         $(AR) rcs $@ $^
67
68 data.a: $(DATA_OBJS)
69         $(AR) rcs $@ $^
70
71 gsm-filetypes.o: files/gsm-filetypes.c 
72         $(CC) $(CFLAGS) -c files/gsm-filetypes.c
73
74 makelib: $(OBJS) DATA.o gsm-filetypes.o
75         $(CC) -shared -o libmygnokii.so $(OBJS) DATA.o gsm-filetypes.o
76
77 clean:
78         $(RM) $(OBJS) $(DATA_OBJS) *~ depend libmygnokii.so COMMON.o gsm-filetypes.o DATA.o
79         
80 install:
81         $(INSTALL) -d $(libdir)
82         $(INSTALL) libmygnokii.so $(libdir)
83         @echo
84
85 depend dep:
86         $(CC) $(CFLAGS) -MM *.c >depend
87
88 ifeq (depend,$(wildcard depend))
89 include depend
90 endif
91
92
93 .PHONY: all install clean dep depend