unstrip-downed Class 2 error messages table
[efax.git] / Makefile
1 # Makefile for efax
2 CC=
3
4 # Change the following to the name of your ANSI C compiler
5 # (normally gcc).
6
7 #CC=gcc
8
9 ifeq "" "$(CC)"
10 CC=m68k-pic-coff-gcc
11 CFLAGS+=-DUCCOMPAT=1
12 STACKSIZE = 150000
13 endif
14
15 # Compile/load options. Add -DNO_STRERROR to CFLAGS if _strerror
16 # is undefined
17
18 CFLAGS+=-Wall -O2
19 LDFLAGS=
20
21 CFLAGS+=-DUCLINUX=1
22
23 # Change the following to the destination directories for
24 # binaries and man pages. Probably /usr/bin and /usr/man on
25 # Linux, /usr/local/{bin,man} on other systems.
26
27 BINDIR=/usr/bin
28 MANDIR=/usr/man
29
30 .c.o:
31         $(CC) $(CFLAGS) -c $<
32
33 all:    efax #efix
34
35 efax:   efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o cleanup.o
36         $(CC) -o efax $(LDFLAGS) efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o cleanup.o
37 ifneq "" "$(findstring -DUCCOMPAT,$(CFLAGS))"
38         /opt/uClinux/m68k-pic-coff/bin/coff2flt -o efax -s $(STACKSIZE) efax.coff
39 endif
40
41 efix:   efix.o efaxlib.o efaxmsg.o
42         $(CC) -o efix $(LDFLAGS) efix.o efaxlib.o efaxmsg.o
43
44 install:
45         cp fax efax efix $(BINDIR)
46         cp fax.1 efax.1 efix.1 $(MANDIR)/man1
47
48 clean:  
49         rm -f efax efix efax.o efix.o efaxlib.o efaxio.o efaxos.o efaxmsg.o cleanup.o
50
51 efax.o:         efax.c    efaxmsg.h efaxlib.h efaxio.h efaxos.h
52 efaxio.o:       efaxio.c  efaxmsg.h           efaxio.h efaxos.h
53 efaxos.o:       efaxos.c  efaxmsg.h efaxlib.h          efaxos.h
54 efix.o:         efix.c    efaxmsg.h efaxlib.h           
55 efaxlib.o:      efaxlib.c efaxmsg.h efaxlib.h           
56 efaxmsg.o:      efaxmsg.c efaxmsg.h