#########################################################################
# Makefile for GNU Indent using dcc or c68 on an Amiga using AMIGADOS   #
# with Ben Eng's 'bmake' program from Fish Disk 523                     #
#                                                                       #
# type 'make' to make AMIGADOS Version                                  #
# type 'make QL=1' to make QDOS Version                                 #
#                                                                       #
# If you want to make this under QDOS, you'll have to                   #
#   1. Amend the make file                                              #
#   2. Have lots of memory to compile indent.c                          #
#########################################################################

if def(QL)
CC = cc
LD = ld
OBJDIR = qdos/
CFLAGS = -DQDOS -Q-warn=1
LDFLAGS = -bufp150K 
BINDIR = qdos/
else
CC =  dcc
LD =  dcc
OBJDIR = amiga/
CFLAGS = -DAMIGA
LDFLAGS = 
BINDIR = work:bin/
endif

SRC =	  indent.c io.c lexi.c parse.c pr_comment.c args.c globs.c backup.c
OBJ =	  $(addprefix $(OBJDIR), indent.o io.o lexi.o parse.o pr_comment.o args.o globs.o backup.o)
HEADERS = indent_globs.h version.h

all: $(BINDIR)indent

$(BINDIR)indent: $(OBJ)
	${LD} -o$(BINDIR)indent $(OBJ)

indent.o: indent.c indent.h sys.h
io.o: io.c indent.h sys.h
lexi.o: lexi.c indent.h sys.h
parse.o: parse.c indent.h sys.h
pr_comment.o: pr_comment.c indent.h sys.h
args.o: args.c indent.h sys.h version.h
globs.o: globs.c sys.h
backup.o: backup.c backup.h sys.h

# Make object files in subdirectory
$(OBJDIR)%.o: %.c
	$(CC) -c $(CFLAGS) -o $@ $<
