// APP.DEF - Sample AUTOMAKE definition file for an application.
//           Uses COMMON.RMK for standard definitions and RTLink with
//           a static overlay.

#include "Common.rmk"

// Clipper compiler switches (overrides CLP macro definition in COMMON.RMK)
CLP = /a /b /p /w

// append "old" directory to .PRG search path
makepath[.prg] := "$(makepath[.prg]);old"

// application modules (put CCode.lib in static overlay)
EXE = OldApp
PRGS = $(EXE) OldPrg1 OldPrg2 OldPrg3 OldPrg4 OldPrg5 OldPrg6
LIBS = Clipper Extend
LIBS_OVL = CCode

#compile rules

// link dependancy rule w/ static overlay -
// _OBJS, _ROOT and _OVL macros are created by AUTOMAKE:
//    _OBJS macro contains a list of Clipper .OBJ files
//    _ROOT macro contains the root script file name
//    _OVL macro contains the overlay script file name
$(EXE).exe: $(_OBJS)
	echo @$(_ROOT)>> $(SCRIPT)
	echo BEGINAREA> $(SCRIPT)
	echo @$(_OVL)>> $(SCRIPT)
	echo ENDAREA>> $(SCRIPT)
	RTLink @$(SCRIPT)
	del $(SCRIPT)
