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 # $(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
33 $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ -o $@
36 $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $<
38 $(TOPDIR)/common/common.a:
39 $(MAKE) -C $(TOPDIR)/common common.a
41 $(TOPDIR)/common/data.a:
42 $(MAKE) -C $(TOPDIR)/common data.a
44 $(TOPDIR)/common/gsm-filetypes.o:
45 $(MAKE) -C $(TOPDIR)/common gsm-filetypes.o
47 $(TOPDIR)/getopt/libgetopt.a:
48 $(MAKE) -C $(TOPDIR)/getopt
50 $(TOPDIR)/common/libmygnokii.so:
51 $(MAKE) -C $(TOPDIR)/common makelib
53 gnokiilib: $(OBJS) $(TOPDIR)/common/libmygnokii.so
54 $(CC) $(LDFLAGS) $(TARGET_ARCH) $(OBJS) -L$(TOPDIR)/common -lmygnokii $(LOADLIBES) $(LDLIBS) -o $@
59 $(RM) $(OBJS) cleanup.o hello.o *~ depend gnokii gnokiilib *.exe core *.bak
62 $(INSTALL) -d $(bindir)
63 $(INSTALL) gnokii $(bindir)
64 $(INSTALL) gnokiilib $(bindir)/gnokii
67 $(INSTALL) -d $(bindir)
68 $(INSTALL) -s gnokii $(bindir)
69 $(INSTALL) -s 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 gnokii $(bindir)
78 $(INSTALL) -o root -g gnokii -m 0750 gnokiilib $(bindir)/gnokii
82 @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \
83 /usr/sbin/groupadd gnokii; \
85 $(INSTALL) -d $(bindir)
86 $(INSTALL) -o root -g gnokii -m 0750 -s gnokii $(bindir)
87 $(INSTALL) -o root -g gnokii -m 0750 -s gnokiilib $(bindir)/gnokii
91 $(CC) $(CFLAGS) -MM *.c >depend
93 ifeq (depend,$(wildcard depend))
97 .PHONY: all install clean dep depend