From f9abc154be065e4cdae688881cfa55f94df610f4 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 7 Nov 2004 11:33:30 +0000 Subject: [PATCH] Autodetect the location of the compiler and tools. git-svn-id: svn://svn.cc65.org/cc65/trunk@3288 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- samples/Makefile | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/samples/Makefile b/samples/Makefile index 7ab37976c..aabaed14f 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -7,12 +7,30 @@ # Enter the target system here SYS = c64 -CRT0 = ../libsrc/$(SYS).o -CLIB = ../libsrc/$(SYS).lib -CC = ../src/cc65/cc65 -CL = ../src/cl65/cl65 -AS = ../src/ca65/ca65 -LD = ../src/ld65/ld65 +# Determine the path to the executables and libraries. If the samples +# directory is part of a complete source tree, use the stuff from this +# source tree, otherwise use the "official" directories. +ifeq "$(wildcard ../src)" "" +# No source tree +CRT0 = $(SYS).o +CLIB = $(SYS).lib +CL = cl65 +CC = cc65 +AS = as65 +LD = ld65 + +else +# Samples is part of a complete source tree +CRT0 = ../libsrc/$(SYS).o +CLIB = ../libsrc/$(SYS).lib +CL = ../src/cl65/cl65 +CC = ../src/cc65/cc65 +AS = ../src/ca65/ca65 +LD = ../src/ld65/ld65 +export CC65_INC = ../include +endif + +# This one comes with VICE C1541 = c1541 -- 2.39.5