# # Makefile for the GNOKII tool suite. # TOPDIR=.. include $(TOPDIR)/Makefile.global STACKSIZE = 150000 CFLAGS += $(PTHREAD_CFLAGS) LDLIBS += $(PTHREAD_LIBS) ifdef XPM_LIBS LDLIBS += $(XPM_LIBS) endif OBJS = gnokii.o ifdef OWN_GETOPT OBJS += $(TOPDIR)/getopt/libgetopt.a endif all: gnokii gnokii: $(OBJS) $(TOPDIR)/common/data.a $(TOPDIR)/common/common.a cleanup.o mcount.o # $(TOPDIR)/common/gsm-filetypes.o $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ -o $@ ifneq "" "$(findstring -DUCCOMPAT,$(CPPFLAGS))" /opt/uClinux/m68k-pic-coff/bin/coff2flt -o gnokii -s $(STACKSIZE) gnokii.coff endif hello: hello.o cleanup.o mcount.o $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ -o $@ hello.o: hello.c $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $^ -o $@ cleanup.o: cleanup.c $(CC) $(filter-out -pg,$(CFLAGS)) $(CPPFLAGS) $(TARGET_ARCH) -c $^ -o $@ mcount.o: mcount.c $(CC) $(filter-out -pg,$(CFLAGS)) $(CPPFLAGS) $(TARGET_ARCH) -c $^ -o $@ $(TOPDIR)/common/common.a: $(MAKE) -C $(TOPDIR)/common common.a $(TOPDIR)/common/data.a: $(MAKE) -C $(TOPDIR)/common data.a $(TOPDIR)/common/gsm-filetypes.o: $(MAKE) -C $(TOPDIR)/common gsm-filetypes.o $(TOPDIR)/getopt/libgetopt.a: $(MAKE) -C $(TOPDIR)/getopt $(TOPDIR)/common/libmygnokii.so: $(MAKE) -C $(TOPDIR)/common makelib gnokiilib: $(OBJS) $(TOPDIR)/common/libmygnokii.so $(CC) $(LDFLAGS) $(TARGET_ARCH) $(OBJS) -L$(TOPDIR)/common -lmygnokii $(LOADLIBES) $(LDLIBS) -o $@ makelib: gnokiilib clean: $(RM) $(OBJS) cleanup.o mcount.o *~ depend gnokii gnokiilib *.exe core *.bak install: all $(INSTALL) -d $(bindir) $(INSTALL) gnokii $(bindir) $(INSTALL) gnokiilib $(bindir)/gnokii install-strip: all $(INSTALL) -d $(bindir) $(INSTALL) -s gnokii $(bindir) $(INSTALL) -s gnokiilib $(bindir)/gnokii @echo "done" install-suid: all @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \ /usr/sbin/groupadd gnokii; \ fi $(INSTALL) -d $(bindir) $(INSTALL) -o root -g gnokii -m 0750 gnokii $(bindir) $(INSTALL) -o root -g gnokii -m 0750 gnokiilib $(bindir)/gnokii @echo install-ss: all @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \ /usr/sbin/groupadd gnokii; \ fi $(INSTALL) -d $(bindir) $(INSTALL) -o root -g gnokii -m 0750 -s gnokii $(bindir) $(INSTALL) -o root -g gnokii -m 0750 -s gnokiilib $(bindir)/gnokii @echo depend dep: $(CC) $(CFLAGS) -MM *.c >depend ifeq (depend,$(wildcard depend)) include depend endif .PHONY: all install clean dep depend