mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 04:30:10 +00:00
samples zip and install targets moved into samples/Makefile as agreed
This commit is contained in:
parent
e36a636eee
commit
4dcfc036c8
17
Makefile
17
Makefile
@ -3,21 +3,22 @@
|
||||
.SUFFIXES:
|
||||
|
||||
all mostlyclean clean install zip:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
@$(MAKE) -C samples --no-print-directory $@
|
||||
|
||||
avail unavail bin:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
|
||||
lib:
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
|
||||
doc:
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
|
||||
%65:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
|
||||
%:
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
|
@ -42,7 +42,6 @@ OUTPUTDIRS := lib \
|
||||
asminc \
|
||||
cfg \
|
||||
include \
|
||||
samples \
|
||||
$(subst ../,,$(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*)))\
|
||||
$(subst ../,,$(wildcard ../target/*/drv/*))\
|
||||
$(subst ../,,$(wildcard ../target/*/util))\
|
||||
|
@ -12,20 +12,19 @@ SYS = c64
|
||||
# source tree; otherwise, use the "install" directories.
|
||||
ifeq "$(wildcard ../src)" ""
|
||||
# No source tree
|
||||
MOUS = /usr/lib/cc65/target/$(SYS)/drv/mou/$(SYS)*.mou
|
||||
TGI = /usr/lib/cc65/target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
||||
installdir = /usr/lib/cc65
|
||||
ifneq "$(wildcard /usr/local/lib/cc65)" ""
|
||||
MOUS = /usr/local/lib/cc65/target/$(SYS)/drv/mou/$(SYS)*.mou
|
||||
TGI = /usr/local/lib/cc65/target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
||||
installdir = /usr/local/lib/cc65
|
||||
endif
|
||||
ifneq "$(wildcard /opt/local/share/cc65)" ""
|
||||
MOUS = /opt/local/share/cc65/target/$(SYS)/drv/mou/$(SYS)*.mou
|
||||
TGI = /opt/local/share/cc65/target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
||||
installdir = /opt/local/share/cc65
|
||||
endif
|
||||
ifdef CC65_HOME
|
||||
MOUS = $(CC65_HOME)/target/$(SYS)/drv/mou/$(SYS)*.mou
|
||||
TGI = $(CC65_HOME)/target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
||||
installdir = $(CC65_HOME)
|
||||
endif
|
||||
|
||||
MOUS = $(installdir)/target/$(SYS)/drv/mou/$(SYS)*.mou
|
||||
TGI = $(installdir)/target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
||||
CLIB = --lib $(SYS).lib
|
||||
CL = cl65
|
||||
CC = cc65
|
||||
@ -109,8 +108,11 @@ EXELIST = ascii \
|
||||
# --------------------------------------------------------------------------
|
||||
# Rules to make the binaries
|
||||
|
||||
.PHONY: all
|
||||
all: $(EXELIST)
|
||||
.PHONY: all samples
|
||||
all:
|
||||
|
||||
samples:
|
||||
$(EXELIST)
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Overlay rules. Overlays need special ld65 configuration files. Also, the
|
||||
@ -138,9 +140,36 @@ samples.d64: all
|
||||
$(C1541) -attach $@ -write $$mod > /dev/null || exit $$?;\
|
||||
done
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Installation rules
|
||||
|
||||
INSTALL = install
|
||||
samplesdir = $(prefix)/share/cc65
|
||||
.PHONY: install
|
||||
install:
|
||||
$(if $(prefix),,$(error variable `prefix' must be set))
|
||||
$(INSTALL) -d $(DESTDIR)$(samplesdir)
|
||||
$(INSTALL) -d $(DESTDIR)$(samplesdir)/geos
|
||||
$(INSTALL) -d $$(DESTDIR)$(samplesdir)/tutorial
|
||||
$(INSTALL) -m0644 *.* $(DESTDIR)$(samplesdir)
|
||||
$(INSTALL) -m0644 README $(DESTDIR)$(samplesdir)
|
||||
$(INSTALL) -m0644 Makefile $(DESTDIR)$(samplesdir)
|
||||
$(INSTALL) -m0644 geos/*.* $(DESTDIR)$(samplesdir)/geos
|
||||
$(INSTALL) -m0644 tutorial/*.* $(DESTDIR)$(samplesdir)/tutorial
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Packaging rules
|
||||
|
||||
.PHONY: zip
|
||||
zip:
|
||||
@cd .. && zip -r cc65 samples/
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Clean-up rules
|
||||
|
||||
.PHONY: mostlyclean
|
||||
mostlyclean:
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) *~ *.map *.o *.s *.lbl
|
||||
|
Loading…
Reference in New Issue
Block a user