3 # Makefile for the GNOKII tool suite.
7 include $(TOPDIR)/Makefile.global
11 CFLAGS += $(PTHREAD_CFLAGS)
12 LDLIBS += $(PTHREAD_LIBS)
21 OBJS += $(TOPDIR)/getopt/libgetopt.a
26 gnokii: $(OBJS) $(TOPDIR)/common/data.a $(TOPDIR)/common/common.a cleanup.o mcount.o # $(TOPDIR)/common/gsm-filetypes.o
27 $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ -o $@
28 ifneq "" "$(findstring -DUCCOMPAT,$(CPPFLAGS))"
29 /opt/uClinux/m68k-pic-coff/bin/coff2flt -o gnokii -s $(STACKSIZE) gnokii.coff
32 hello: hello.o cleanup.o mcount.o
33 $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ -o $@
36 $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $^ -o $@
39 $(CC) $(filter-out -pg,$(CFLAGS)) $(CPPFLAGS) $(TARGET_ARCH) -c $^ -o $@
42 $(CC) $(filter-out -pg,$(CFLAGS)) $(CPPFLAGS) $(TARGET_ARCH) -c $^ -o $@
44 $(TOPDIR)/common/common.a:
45 $(MAKE) -C $(TOPDIR)/common common.a
47 $(TOPDIR)/common/data.a:
48 $(MAKE) -C $(TOPDIR)/common data.a
50 $(TOPDIR)/common/gsm-filetypes.o:
51 $(MAKE) -C $(TOPDIR)/common gsm-filetypes.o
53 $(TOPDIR)/getopt/libgetopt.a:
54 $(MAKE) -C $(TOPDIR)/getopt
56 $(TOPDIR)/common/libmygnokii.so:
57 $(MAKE) -C $(TOPDIR)/common makelib
59 gnokiilib: $(OBJS) $(TOPDIR)/common/libmygnokii.so
60 $(CC) $(LDFLAGS) $(TARGET_ARCH) $(OBJS) -L$(TOPDIR)/common -lmygnokii $(LOADLIBES) $(LDLIBS) -o $@
65 $(RM) $(OBJS) cleanup.o mcount.o *~ depend gnokii gnokiilib *.exe core *.bak
68 $(INSTALL) -d $(bindir)
69 $(INSTALL) gnokii $(bindir)
70 $(INSTALL) gnokiilib $(bindir)/gnokii
73 $(INSTALL) -d $(bindir)
74 $(INSTALL) -s gnokii $(bindir)
75 $(INSTALL) -s gnokiilib $(bindir)/gnokii
79 @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \
80 /usr/sbin/groupadd gnokii; \
82 $(INSTALL) -d $(bindir)
83 $(INSTALL) -o root -g gnokii -m 0750 gnokii $(bindir)
84 $(INSTALL) -o root -g gnokii -m 0750 gnokiilib $(bindir)/gnokii
88 @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \
89 /usr/sbin/groupadd gnokii; \
91 $(INSTALL) -d $(bindir)
92 $(INSTALL) -o root -g gnokii -m 0750 -s gnokii $(bindir)
93 $(INSTALL) -o root -g gnokii -m 0750 -s gnokiilib $(bindir)/gnokii
97 $(CC) $(CFLAGS) -MM *.c >depend
99 ifeq (depend,$(wildcard depend))
103 .PHONY: all install clean dep depend