mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 17:30:50 +00:00
Makefile patch contributed by Greg King:
I added the "MAKEOPTS=" to the top-level "gcc.mak" that he wants, and I changed the tool source tree's top-level make-file so that it supports parallel building. (I added a rule that builds the common library before building anything else.) git-svn-id: svn://svn.cc65.org/cc65/trunk@4497 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
dc977737aa
commit
ff4eeebec2
13
make/gcc.mak
13
make/gcc.mak
@ -14,6 +14,10 @@
|
|||||||
#MAKEOVERRIDES=
|
#MAKEOVERRIDES=
|
||||||
# (That trick has been disabled.)
|
# (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
|
# The install prefix and directories
|
||||||
prefix = /usr/local
|
prefix = /usr/local
|
||||||
exec_prefix = $(prefix)
|
exec_prefix = $(prefix)
|
||||||
@ -58,9 +62,10 @@ endif
|
|||||||
all: bins libs docs $(SYS:%=samples tests)
|
all: bins libs docs $(SYS:%=samples tests)
|
||||||
|
|
||||||
bins:
|
bins:
|
||||||
@$(MAKE) -C src -f make/gcc.mak CA65_INC=\\\"${CA65_INC}/\\\" \
|
@$(MAKE) -C src -f make/gcc.mak $(MAKEOPTS) \
|
||||||
CC65_INC=\\\"${CC65_INC}/\\\" LD65_CFG=\\\"${LD65_CFG}/\\\" \
|
CA65_INC=\\\"${CA65_INC}/\\\" CC65_INC=\\\"${CC65_INC}/\\\" \
|
||||||
LD65_LIB=\\\"${LD65_LIB}/\\\" LD65_OBJ=\\\"${LD65_OBJ}/\\\"
|
LD65_CFG=\\\"${LD65_CFG}/\\\" LD65_LIB=\\\"${LD65_LIB}/\\\" \
|
||||||
|
LD65_OBJ=\\\"${LD65_OBJ}/\\\"
|
||||||
|
|
||||||
libs:
|
libs:
|
||||||
@$(MAKE) -C libsrc
|
@$(MAKE) -C libsrc
|
||||||
@ -69,7 +74,7 @@ libs:
|
|||||||
# if a host system doesn't have LinuxDoc Tools.
|
# if a host system doesn't have LinuxDoc Tools.
|
||||||
docs:
|
docs:
|
||||||
@if linuxdoc -B check doc/index >/dev/null 2>&1; \
|
@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.'; \
|
else echo '"LinuxDoc Tools" is not installed; skipping HTML documentation.'; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,21 +1,26 @@
|
|||||||
#
|
#
|
||||||
# gcc Makefile for the program sources
|
# gcc Makefile for the program sources
|
||||||
#
|
#
|
||||||
|
PROGS = \
|
||||||
SUBDIRS = \
|
ar65 \
|
||||||
common \
|
ca65 \
|
||||||
ar65 \
|
cc65 \
|
||||||
ca65 \
|
chrcvt \
|
||||||
cc65 \
|
cl65 \
|
||||||
chrcvt \
|
co65 \
|
||||||
cl65 \
|
da65 \
|
||||||
co65 \
|
grc \
|
||||||
da65 \
|
ld65 \
|
||||||
grc \
|
|
||||||
ld65 \
|
|
||||||
od65
|
od65
|
||||||
|
|
||||||
.PHONY: all dist clean zap
|
SUBDIRS = common $(PROGS)
|
||||||
all dist clean zap:
|
|
||||||
for i in $(SUBDIRS); do $(MAKE) -C $$i -f make/gcc.mak $@ || exit $$?; done
|
.PHONY: all dist clean zap $(SUBDIRS)
|
||||||
|
all dist clean zap: $(SUBDIRS)
|
||||||
|
|
||||||
|
# Finish building the common library before allowing parallel makes.
|
||||||
|
$(PROGS): common
|
||||||
|
|
||||||
|
$(SUBDIRS):
|
||||||
|
$(MAKE) -C $@ -f make/gcc.mak $(MAKECMDGOALS)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user