]> git.sur5r.net Git - cc65/commitdiff
Autodetect the location of the compiler and tools.
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 7 Nov 2004 11:33:30 +0000 (11:33 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 7 Nov 2004 11:33:30 +0000 (11:33 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3288 b7a2c559-68d2-44c3-8de9-860c34a00d81

samples/Makefile

index 7ab37976c5ba28205d759d4679adf1ff1672655f..aabaed14f289ee9762364191121b6adcd82c9167 100644 (file)
@@ -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