3 # Makefile for the GNOKII tool suite.
7 include $(TOPDIR)/Makefile.global
10 CFLAGS += $(PTHREAD_CFLAGS)
11 LDLIBS += $(PTHREAD_LIBS)
20 OBJS += $(TOPDIR)/getopt/libgetopt.a
25 gnokii: $(OBJS) $(TOPDIR)/common/data.a $(TOPDIR)/common/common.a cleanup.o # $(TOPDIR)/common/gsm-filetypes.o
26 $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ -o $@
27 #-L../common -lcommon ##$(LOADLIBES) $(LDLIBS)
29 $(TOPDIR)/common/common.a:
30 $(MAKE) -C $(TOPDIR)/common common.a
32 $(TOPDIR)/common/data.a:
33 $(MAKE) -C $(TOPDIR)/common data.a
35 $(TOPDIR)/common/gsm-filetypes.o:
36 $(MAKE) -C $(TOPDIR)/common gsm-filetypes.o
38 $(TOPDIR)/getopt/libgetopt.a:
39 $(MAKE) -C $(TOPDIR)/getopt
41 $(TOPDIR)/common/libmygnokii.so:
42 $(MAKE) -C $(TOPDIR)/common makelib
44 gnokiilib: $(OBJS) $(TOPDIR)/common/libmygnokii.so
45 $(CC) $(LDFLAGS) $(TARGET_ARCH) $(OBJS) -L$(TOPDIR)/common -lmygnokii $(LOADLIBES) $(LDLIBS) -o $@
50 $(RM) $(OBJS) cleanup.o *~ depend gnokii gnokiilib *.exe core *.bak
53 $(INSTALL) -d $(bindir)
54 $(INSTALL) gnokii $(bindir)
55 $(INSTALL) gnokiilib $(bindir)/gnokii
58 $(INSTALL) -d $(bindir)
59 $(INSTALL) -s gnokii $(bindir)
60 $(INSTALL) -s gnokiilib $(bindir)/gnokii
64 @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \
65 /usr/sbin/groupadd gnokii; \
67 $(INSTALL) -d $(bindir)
68 $(INSTALL) -o root -g gnokii -m 0750 gnokii $(bindir)
69 $(INSTALL) -o root -g gnokii -m 0750 gnokiilib $(bindir)/gnokii
73 @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \
74 /usr/sbin/groupadd gnokii; \
76 $(INSTALL) -d $(bindir)
77 $(INSTALL) -o root -g gnokii -m 0750 -s gnokii $(bindir)
78 $(INSTALL) -o root -g gnokii -m 0750 -s gnokiilib $(bindir)/gnokii
82 $(CC) $(CFLAGS) -MM *.c >depend
84 ifeq (depend,$(wildcard depend))
88 .PHONY: all install clean dep depend