
# Created: Thu/8/Apr/1999
#
# Makefile for FloppyFlux v1.x
#
# Copyright © 1999 Andrew Bell. All rights reserved.

SOURCES   = FF_main.c FF_imagelist.c FF_configio.c FF_routines.c FF_diskio.c \
            FF_wininfo.c FF_winprogress.c FF_winsettings.c FF_winmain.c \
            FF_strings.c FF_wingetstr.c FF_imagecache.c FF_iconify.c FF_wb.c
PROTOFILE = FF_protos.h
DCCOPTS   = -proto -Hainc:system.m=ainc:system.h -mi -s -3.0 -020
LINKDIR   = Link
CSRCS     = $(SOURCES:*.c:*.c)
COBJS     = $(SOURCES:*.c:"$(LINKDIR)/*.o")

FloppyFlux : $(PROTOFILE) $(COBJS)
	@echo Building debug executable... NOLINE
	@dcc $(COBJS) -o %(left) $(DCCOPTS)
	@list %(left) lformat="Finished, size = %l bytes."
	@version %(left) FULL
    @; Ignore this following line...
	@striphunk %(left) TO Store:BetaPrgs/FloppyFlux/FloppyFlux DREL32 DEBUG SYMBOL

$(COBJS) : $(CSRCS)
	@echo Building %(right)...
	@dcc -c %(right) -o %(left) $(DCCOPTS)

# Always build the proto file if any sources change.

$(PROTOFILE) : $(CSRCS)
	@echo "*nGenerating function prototypes..."
	@makeproto %(right) -o %(left)

# Make sure that the object drawer exists.

$(LINKDIR) : $(LINKDIR)
	@echo Creating linker work directory...
	@makedir $(LINKDIR)

# Delete any unwanted temp files.

clean:
	delete $(LINKDIR)/FF#?.o
