]> git.sur5r.net Git - cc65/blobdiff - make/gcc.mak
Makefile patch contributed by Greg King:
[cc65] / make / gcc.mak
index 5ae2eb85400d0a3fd771b5dedc35718e7cfa9bd5..6b858e219e3b5d16f5a0c01701719b384ce0d920 100644 (file)
 #MAKEOVERRIDES=
 # (That trick has been disabled.)
 
+# To compile with custom make-options, set them here; for example:
+#MAKEOPTS = -j 2 CFLAGS=-O4 CC=clang
+MAKEOPTS =
+
 # The install prefix and directories
 prefix         = /usr/local
 exec_prefix    = $(prefix)
@@ -58,9 +62,10 @@ endif
 all:   bins libs docs $(SYS:%=samples tests)
 
 bins:
-       @$(MAKE) -C src -f make/gcc.mak CA65_INC=\\\"${CA65_INC}/\\\" \
-         CC65_INC=\\\"${CC65_INC}/\\\" LD65_CFG=\\\"${LD65_CFG}/\\\" \
-         LD65_LIB=\\\"${LD65_LIB}/\\\" LD65_OBJ=\\\"${LD65_OBJ}/\\\"
+       @$(MAKE) -C src -f make/gcc.mak $(MAKEOPTS) \
+         CA65_INC=\\\"${CA65_INC}/\\\" CC65_INC=\\\"${CC65_INC}/\\\" \
+         LD65_CFG=\\\"${LD65_CFG}/\\\" LD65_LIB=\\\"${LD65_LIB}/\\\" \
+         LD65_OBJ=\\\"${LD65_OBJ}/\\\"
 
 libs:
        @$(MAKE) -C libsrc
@@ -69,7 +74,7 @@ libs:
 # if a host system doesn't have LinuxDoc Tools.
 docs:
        @if linuxdoc -B check doc/index >/dev/null 2>&1; \
-         then $(MAKE) -C doc html; \
+         then $(MAKE) -C doc $(MAKEOPTS) html; \
          else echo '"LinuxDoc Tools" is not installed; skipping HTML documentation.'; \
          fi