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/COMMON.o $(TOPDIR)/common/gsm-filetypes.o
26 $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LOADLIBES) $(LDLIBS) -o $@
28 $(TOPDIR)/common/COMMON.o:
29 $(MAKE) -C $(TOPDIR)/common COMMON.o
31 $(TOPDIR)/common/gsm-filetypes.o:
32 $(MAKE) -C $(TOPDIR)/common gsm-filetypes.o
34 $(TOPDIR)/getopt/libgetopt.a:
35 $(MAKE) -C $(TOPDIR)/getopt
37 $(TOPDIR)/common/libmygnokii.so:
38 $(MAKE) -C $(TOPDIR)/common makelib
40 gnokiilib: $(OBJS) $(TOPDIR)/common/libmygnokii.so
41 $(CC) $(LDFLAGS) $(TARGET_ARCH) $(OBJS) -L$(TOPDIR)/common -lmygnokii $(LOADLIBES) $(LDLIBS) -o $@
46 $(RM) $(OBJS) *~ depend gnokii gnokiilib *.exe core *.bak
49 $(INSTALL) -d $(bindir)
50 $(INSTALL) gnokii $(bindir)
51 $(INSTALL) gnokiilib $(bindir)/gnokii
54 $(INSTALL) -d $(bindir)
55 $(INSTALL) -s gnokii $(bindir)
56 $(INSTALL) -s gnokiilib $(bindir)/gnokii
60 @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \
61 /usr/sbin/groupadd gnokii; \
63 $(INSTALL) -d $(bindir)
64 $(INSTALL) -o root -g gnokii -m 0750 gnokii $(bindir)
65 $(INSTALL) -o root -g gnokii -m 0750 gnokiilib $(bindir)/gnokii
69 @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \
70 /usr/sbin/groupadd gnokii; \
72 $(INSTALL) -d $(bindir)
73 $(INSTALL) -o root -g gnokii -m 0750 -s gnokii $(bindir)
74 $(INSTALL) -o root -g gnokii -m 0750 -s gnokiilib $(bindir)/gnokii
78 $(CC) $(CFLAGS) -MM *.c >depend
80 ifeq (depend,$(wildcard depend))
84 .PHONY: all install clean dep depend