URL
https://opencores.org/ocsvn/zipcpu/zipcpu/trunk
Subversion Repositories zipcpu
[/] [zipcpu/] [trunk/] [sw/] [Makefile] - Rev 113
Go to most recent revision | Compare with Previous | Blame | View Log
################################################################################## Filename: Makefile## Project: Zip CPU -- a small, lightweight, RISC CPU soft core## Purpose: This makefile attempts to build the ZipCPU toolchain. This# includes binutils and GCC. (Eventually, it will include the# standard library as well ...) Configuration options for binutils and# GCC can be found in the gas-script.sh and gcc-script.sh files# respectively.## Targets:# make basic-install# Attempts to build binutils, gcc, and the (now obsolete) zasm# assembler, and to install them into INSTALL directory. This is# also the default target.## make all:# Includes the basic-install target, but also the pdf# documentation files that come with binutils and gcc. Building# this target will require a LaTeX distribution in addition to the# needs of the other targets. (These documents may also be found# online, and have not been edited as part of the ZipCPU toolchain# ... (yet).)## make clean### Creator: Dan Gisselquist, Ph.D.# Gisselquist Technology, LLC################################################################################### Copyright (C) 2015, Gisselquist Technology, LLC## This program is free software (firmware): you can redistribute it and/or# modify it under the terms of the GNU General Public License as published# by the Free Software Foundation, either version 3 of the License, or (at# your option) any later version.## This program is distributed in the hope that it will be useful, but WITHOUT# ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License# for more details.## License: GPL, v3, as defined and found on www.gnu.org,# http://www.gnu.org/licenses/gpl.html###################################################################################basic-install: binutils-install gcc-install zasm-installall: basic-install binutils-pdf-install gcc-pdf-installBINUTILSD=binutils-2.25BUILDGASD=build-gasBUILDGCCD=build-gccINSTALL=`pwd`/installPDFD=$(INSTALL)/usr/docZASMD=zasmbinutils-2.25: binutils-2.25.tar.bz2 binutils-2.25.patchrm -rf binutils-2.25/tar -xjf ./binutils-2.25.tar.bz2bash -c "cd binutils-2.25; patch -p1 <../binutils-2.25.patch"rm -rf $(BUILDGASD).PHONY: binutilsbinutils: binutils-2.25bash -c "if [ ! -e binutils-2.25 ]; then bash gas-script.sh; fi"$(MAKE) --no-print-directory --directory=$(BUILDGASD).PHONY: binutils-installbinutils-install: binutils$(MAKE) --no-print-directory --directory=$(BUILDGASD) install.PHONY: binutils-pdfbinutils-pdf: binutils$(MAKE) --no-print-directory --directory=$(BUILDGASD) pdf.PHONY: binutils-pdf-installbinutils-pdf-install: binutils-pdfmkdir -p $(PDFD)find $(BUILDGASD) -name "*.pdf" -exec cp \{\} $(PDFD)/ \;### Now let's try the same thing for GCC##gcc-5.3.0-zip: gcc-5.3.0.tar.bz2 gcc-5.3.0-specs-1.patch gcc-zippatch.patchrm -rf gcc-5.3.0-zip/tar -xjf ./gcc-5.3.0.tar.bz2 --transform s,gcc-5.3.0,gcc-5.3.0-zip,bash -c "cd gcc-5.3.0-zip; patch -p1 <../gcc-5.3.0-specs-1.patch"rm gcc-5.3.0-zip/gcc/config/rs6000/sysv4.h.origbash -c "cd gcc-5.3.0-zip; patch -p1 <../gcc-zippatch.patch"rm -rf $(BUILDGCCD).PHONY: gccgcc: gcc-5.3.0-zipbash -c "if [[ ! -e $(BUILDGCCD) ]]; then bash gcc-script.sh; fi"$(MAKE) --no-print-directory --directory=$(BUILDGCCD)/gcc.PHONY: gcc-installgcc-install: gcc$(MAKE) --no-print-directory --directory=$(BUILDGCCD)/gcc install.PHONY: gcc-pdfgcc-pdf: gcc$(MAKE) --no-print-directory --directory=$(BUILDGCCD) pdf.PHONY: gcc-pdf-installgcc-pdf-install: gcc-pdfmkdir -p $(PDFD)find $(BUILDGCCD) -name "*.pdf" -exec cp \{\} $(PDFD)/ \;### Finally, can we build and install zasm?##zasm:$(MAKE) --no-print-directory --directory=$(ZASMD)zasm-install: zasm$(MAKE) --no-print-directory --directory=$(ZASMD) install### The clean target##.PHONY: cleanclean:rm -rf $(INSTALL)rm -rf binutils-2.25 gcc-5.3.0-ziprm -rf $(BUILDGASD) $(BUILDGCCD)$(MAKE) --no-print-directory --directory=$(ZASMD) clean
Go to most recent revision | Compare with Previous | Blame | View Log
