# Makefile.in for LCC, Amiga port 26-Aug-1996; Joop van de Wege
# email: Joop.vandeWege@medew.ento.wau.nl
# -Dwrite=amy_write is needed when -noixemul is used and lcc is using
#  PhxAss/PhxLnk
# TODO: make install rule
#       add rule for building with lcc/rcc (path problems!)

srcdir = @srcdir@
VPATH = @srcdir@
CC=@CXX@
CFLAGS = @CFLAGS@
GNUFLAGS = @GNUFLAGS@
INTERNAL_CFLAGS= $(CFLAGS) $(GNUFLAGS) #-Dwrite=amy_write
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
infodir = $(prefix)/info

OBJS=cpp.o lex.o nlist.o tokens.o macro.o eval.o \
	include.o hideset.o unix.o getopt.o amiga.o

all:	cpp

cpp:    $(OBJS)
		$(CC) -o $@ $(OBJS) $(LDFLAGS)

cpp.o: cpp.c
	${CC} ${INTERNAL_CFLAGS} -c $(srcdir)/cpp.c
lex.o: lex.c
	${CC} ${INTERNAL_CFLAGS} -c $(srcdir)/lex.c
nlist.o: nlist.c
	${CC} ${INTERNAL_CFLAGS} -c $(srcdir)/nlist.c
tokens.o: tokens.c
	${CC} ${INTERNAL_CFLAGS} -c $(srcdir)/tokens.c
macro.o: macro.c
	${CC} ${INTERNAL_CFLAGS} -c $(srcdir)/macro.c
eval.o: eval.c
	${CC} ${INTERNAL_CFLAGS} -c $(srcdir)/eval.c
include.o: include.c
	${CC} ${INTERNAL_CFLAGS} -c $(srcdir)/include.c
hideset.o: hideset.c
	${CC} ${INTERNAL_CFLAGS} -c $(srcdir)/hideset.c
unix.o: unix.c
	${CC} ${INTERNAL_CFLAGS} -c $(srcdir)/unix.c
getopt.o: getopt.c
	${CC} ${INTERNAL_CFLAGS} -c $(srcdir)/getopt.c
amiga.o: amiga.c
	${CC} ${INTERNAL_CFLAGS} -c $(srcdir)/amiga.c

$(OBJS):	cpp.h

clean:
		rm -f *.o core

clobber:	clean
		rm -f cpp *.out
