Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | # ========== Copyright Header Begin ========================================== |
2 | # | |
3 | # OpenSPARC T2 Processor File: Makefile | |
4 | # Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. | |
5 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES. | |
6 | # | |
7 | # The above named program is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU General Public | |
9 | # License version 2 as published by the Free Software Foundation. | |
10 | # | |
11 | # The above named program is distributed in the hope that it will be | |
12 | # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | # General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public | |
17 | # License along with this work; if not, write to the Free Software | |
18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | |
19 | # | |
20 | # ========== Copyright Header End ============================================ | |
21 | # top-level makefile for rst tools | |
22 | ||
23 | include Makefile.master | |
24 | ||
25 | TOP_DIR = $(PWD) | |
26 | ||
27 | COMPONENTS = rstf trconv rstzip3 | |
28 | ||
29 | 32g 32opt 64g 64opt: setup | |
30 | for a in $(COMPONENTS); do cd $$a ; CUR_DIR=$(PWD)/$$a ; export CUR_DIR; $(MAKE) $@ ; cd .. ; done | |
31 | cd rst-tools ; PWD=$(PWD)/rst-tools ; export PWD; $(MAKE) $@ ; cd .. | |
32 | ||
33 | amd64: setup | |
34 | for a in $(COMPONENTS); do echo "make amd64 in $$a"; cd $$a ; CUR_DIR=$(PWD)/$$a ; export CUR_DIR; $(MAKE) $@ ; cd .. ; done | |
35 | ||
36 | example: FRC | |
37 | cd example ; $(MAKE) RSTDIR=$(INSTALL_DIR)/ ; cd .. | |
38 | ||
39 | clean: FRC | |
40 | for a in $(COMPONENTS); do cd $$a ; CUR_DIR=$(PWD)/$$a ; export CUR_DIR; $(MAKE) $@ ; cd .. ; done | |
41 | cd rst-tools ; PWD=$(PWD)/rst-tools ; export PWD; $(MAKE) $@ ; cd .. | |
42 | ||
43 | test: FRC | |
44 | cd tests ; $(MAKE) ; cd .. | |
45 | ||
46 | # in this version, rstzip2 is the standard rstzip | |
47 | install: setup component_install rzsetup example | |
48 | install -m 0664 -f $(INSTALL_DIR) HISTORY | |
49 | # chmod -R g+w $(INSTALL_DIR) | |
50 | $(MAKE) test | |
51 | for f in Makefile README rstexample.C; do install -m 0664 -f $(INSTALL_DIR)/example example/$$f; done | |
52 | install -m 0775 -f $(INSTALL_DIR)/example example/rstexample | |
53 | ||
54 | component_install: | |
55 | for a in $(COMPONENTS); do cd $$a ; CUR_DIR=$(PWD)/$$a ; export CUR_DIR; $(MAKE) install ; cd .. ; done | |
56 | cd rst-tools ; PWD=$(PWD)/rst-tools ; export PWD; $(MAKE) install ; cd .. | |
57 | ||
58 | rzsetup: | |
59 | if test -L $(INSTALL_DIR)/bin/rstzip ; then unlink $(INSTALL_DIR)/bin/rstzip; fi; ln -s rstzip3 $(INSTALL_DIR)/bin/rstzip | |
60 | if test -L $(INSTALL_DIR)/bin/rstzip-64 ; then unlink $(INSTALL_DIR)/bin/rstzip-64; fi; ln -s rstzip3-64 $(INSTALL_DIR)/bin/rstzip-64 | |
61 | if test -L $(INSTALL_DIR)/bin/rstunzip ; then unlink $(INSTALL_DIR)/bin/rstunzip; fi; ln -s rstzip $(INSTALL_DIR)/bin/rstunzip | |
62 | if test -L $(INSTALL_DIR)/include/rstzip ; then unlink $(INSTALL_DIR)/include/rstzip ; fi; ln -s . $(INSTALL_DIR)/include/rstzip | |
63 | if test -L $(INSTALL_DIR)/lib/32/librstzip.o ; then unlink $(INSTALL_DIR)/lib/32/librstzip.o ; fi; ln -s librstzip3.o $(INSTALL_DIR)/lib/32/librstzip.o | |
64 | if test -L $(INSTALL_DIR)/lib/64/librstzip.o ; then unlink $(INSTALL_DIR)/lib/64/librstzip.o ; fi; ln -s librstzip3.o $(INSTALL_DIR)/lib/64/librstzip.o | |
65 | if test -L $(INSTALL_DIR)/lib/32/librstzip.so ; then unlink $(INSTALL_DIR)/lib/32/librstzip.so ; fi; ln -s librstzip3.so $(INSTALL_DIR)/lib/32/librstzip.so | |
66 | if test -L $(INSTALL_DIR)/lib/64/librstzip.so ; then unlink $(INSTALL_DIR)/lib/64/librstzip.so ; fi; ln -s librstzip3.so $(INSTALL_DIR)/lib/64/librstzip.so | |
67 | ||
68 | setup: FRC | |
69 | if test ! -L rstzip; then ln -s rstzip3 rstzip; fi; | |
70 | if test ! -d $(BUILD_DIR); then mkdir -m 0755 -p $(BUILD_DIR); fi; | |
71 | if test -d $(INSTALL_DIR)/bin ; then true; else mkdir -m 0775 -p $(INSTALL_DIR)/bin; fi; | |
72 | if test -d $(INSTALL_DIR)/include ; then true; else mkdir -m 0775 -p $(INSTALL_DIR)/include; fi; | |
73 | if test -d $(INSTALL_DIR)/lib/32 ; then true; else mkdir -m 0775 -p $(INSTALL_DIR)/lib/32; fi; | |
74 | if test -d $(INSTALL_DIR)/lib/64 ; then true; else mkdir -m 0775 -p $(INSTALL_DIR)/lib/64; fi; | |
75 | if test -d $(INSTALL_DIR)/example ; then true; else mkdir -m 0775 -p $(INSTALL_DIR)/example ; fi; | |
76 | ||
77 | # dummy "force make" target | |
78 | FRC: |