home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
fifolib-38.3-src.tgz
/
tar.out
/
contrib
/
fifolib
/
Makefile.in
< prev
next >
Wrap
Makefile
|
1996-09-28
|
3KB
|
106 lines
# GNU-Makefile for fifo library
# If configure doesn't work for you ({} globbed in config.cache), your
# pdksh is outdated, get a version newer than November 95.
# You may prefer simply . (current directory)
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
# You may prefer libs: and l:
libsdir = $(exec_prefix)/Sys/libs
ldir = $(exec_prefix)/Sys/l
# You may prefer $(prefix)/os-include
incdir = $(prefix)/include
infodir = $(prefix)/info
fddir = $(prefix)/lib/fd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
CC = @CC@
RM = rm
DEFS = @DEFS@ -DUSE_PC_REL
LIBS = @LIBS@
# flags ignored, Fred Fish's configure throws -O2 into CFLAGS
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
INCLUDES = -I$(srcdir)
# don't let CFLAGS, LDFLAGS get in my way, ignore them
OUR_CFLAGS = $(DEFS) -O2 -Wall -msmall-code -noixemul $(INCLUDES)
OUR_LDFLAGS = -Wl,-x
# -noixemul (optional) makes independent (2.0) binaries for small systems
# only RemCLI and testfifo need some libc.a
# -DUSE_PC_REL if your gas generates 68000-compatible code for pc@(label)
# -DUSE_SIGNAL if you use neither DICE nor libnix, e.g. ixemul
# -msmall-code passes -l to as and -shortdata to ld
# -I$(srcdir) so <libraries/fifo.h> is found there
# -Wl,-x to keep only external symbols (no dreaded __gnu_compiled_c)
# -nostartfiles is necessary because htags.s and tag.s contain startup code
# -nostdlib implies -nostartfiles
.SUFFIXES: .S .c
# .S means that assembly file must be preprocessed
.S.o:
$(CC) $(OUR_CFLAGS) -c $<
.c.o:
$(CC) $(OUR_CFLAGS) -c $<
all: fifo-handler fifo.library RemCLI testfifo
# with optimization on, needs no link library at all
fifo.library: tag.o lib.o fifo.o
$(CC) -nostdlib $(OUR_CFLAGS) $(OUR_LDFLAGS) -o $@ $^
# still needs -lamiga for CreatePort etc.
fifo-handler: htag.o fifo-handler.o
$(CC) -nostdlib $(OUR_CFLAGS) $(OUR_LDFLAGS) -o $@ $^ -lamiga
fifo-handler-debug: htag.o fifo-handler-debug.o
$(CC) -v -nostdlib $(OUR_CFLAGS) $(OUR_LDFLAGS) -o $@ $^ -lamiga
tag.o: tag.S
lib.o: lib.c defs.h
fifo.o: fifo.c defs.h
htag.o: htag.S
fifo-handler.o: fifo-handler.c handler.h
fifo-handler-debug.o: fifo-handler.c
$(CC) -DDEBUG $(OUR_CFLAGS) -o $@ -c $<
RemCLI: remcli.o
$(CC) $(OUR_CFLAGS) $(OUR_LDFLAGS) -o $@ $^ -lamiga
testfifo: testfifo.o
$(CC) $(OUR_CFLAGS) $(OUR_LDFLAGS) -o $@ $^ -lamiga
install:
$(INSTALL_PROGRAM) fifo-handler $(ldir)/fifo-handler
$(INSTALL_PROGRAM) fifo.library $(libsdir)/fifo.library
$(INSTALL_PROGRAM) RemCLI $(bindir)/RemCLI
$(INSTALL_DATA) $(srcdir)/clib/fifo_protos.h $(incdir)/clib/fifo_protos.h
$(INSTALL_DATA) $(srcdir)/inline/fifo.h $(incdir)/inline/fifo.h
$(INSTALL_DATA) $(srcdir)/libraries/fifo.h $(incdir)/libraries/fifo.h
$(INSTALL_DATA) $(srcdir)/proto/fifo.h $(incdir)/proto/fifo.h
$(INSTALL_DATA) $(srcdir)/fd/fifo_lib.fd $(fddir)/fifo_lib.fd
clean:
$(RM) -f *.o *! *~
clobber: clean
$(RM) -f fifo-handler fifo.library testfifo RemCLI fifo-handler-debug