X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=Makefile;h=41db9b12100d77f849be97cfa71254c840d5f4b2;hb=refs%2Fheads%2Fuc;hp=ffefde8cd9e6e77c0177a454ee410f4ff037d588;hpb=6c29488ae32ccdf1d594d24a286bdb6f1c53ad32;p=efax.git diff --git a/Makefile b/Makefile index ffefde8..41db9b1 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,25 @@ # Makefile for efax +CC= # Change the following to the name of your ANSI C compiler # (normally gcc). -CC=gcc +#CC=gcc + +ifeq "" "$(CC)" +CC=m68k-pic-coff-gcc +CFLAGS+=-DUCCOMPAT=1 +STACKSIZE = 150000 +endif # Compile/load options. Add -DNO_STRERROR to CFLAGS if _strerror # is undefined -CFLAGS= +CFLAGS+=-Wall -O2 LDFLAGS= +CFLAGS+=-DUCLINUX=1 + # Change the following to the destination directories for # binaries and man pages. Probably /usr/bin and /usr/man on # Linux, /usr/local/{bin,man} on other systems. @@ -21,22 +30,23 @@ MANDIR=/usr/man .c.o: $(CC) $(CFLAGS) -c $< -all: efax efix +all: efax #efix -efax: efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o - $(CC) -o efax $(LDFLAGS) efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o - strip efax +efax: efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o cleanup.o + $(CC) -o efax $(LDFLAGS) efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o cleanup.o +ifneq "" "$(findstring -DUCCOMPAT,$(CFLAGS))" + /opt/uClinux/m68k-pic-coff/bin/coff2flt -o efax -s $(STACKSIZE) efax.coff +endif efix: efix.o efaxlib.o efaxmsg.o $(CC) -o efix $(LDFLAGS) efix.o efaxlib.o efaxmsg.o - strip efix install: cp fax efax efix $(BINDIR) cp fax.1 efax.1 efix.1 $(MANDIR)/man1 clean: - rm -f efax efix efax.o efix.o efaxlib.o efaxio.o efaxos.o efaxmsg.o + rm -f efax efix efax.o efix.o efaxlib.o efaxio.o efaxos.o efaxmsg.o cleanup.o efax.o: efax.c efaxmsg.h efaxlib.h efaxio.h efaxos.h efaxio.o: efaxio.c efaxmsg.h efaxio.h efaxos.h