Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / rst / rstzip3 / rstzip_v3 / Makefile
CommitLineData
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# Makefile for rst/rstzip/rstzip_v2
22
23include ../../Makefile.master
24
25TOP_DIR = ../..
26
27INCLUDES += -I../../..
28
29TARG = librz3.o
30
31$(TARG)-32g: $(TARG)
32$(TARG)-32opt: $(TARG)
33$(TARG)-64g: $(TARG)
34$(TARG)-64opt: $(TARG)
35
36# CFILES = cpuid.c printhex.c rstzip2c.c
37# CCFILES = diffrst.C mpsort.C rstzip2.C rstzip2if.C
38# OBJS = $(CCFILES:%.C=%.o) $(CFILES:%.c=%.o)
39CFILES = rstzip3.C rz3_section.C rz3iu.C compress_engine.C decompress_engine.C
40HFILES = rstzip3.h rz3_bitarray.h rz3_bitarray.v3.14b.h rz3iu.h rz3_lruhash.h rz3_perf_stats.h rz3_rst_array.h rz3_section.h rz3utils.h rz3_valuecache.h
41# ILFILES = regen.il
42
43ALLSRCS = $(CFILES) $(HFILES) $(ILFILES)
44
45OBJS = $(CFILES:%.C=%.o)
46
47$(TARG): $(OBJS)
48 $(LD) -r -o $@ $(OBJS)
49
50$(TARG)-amd64: $(OBJS) byteswap.o
51 $(LD) -r -o $(TARG) $(OBJS) byteswap.o
52
53byteswap.o: byteswap.s
54 $(AS) -P -xarch=amd64 -DARCH_AMD64 byteswap.s
55
56#compress_engine.o: compress_engine.C regen.il
57# $(CCC) $(CFLAGS) -c -o $@ regen.il compress_engine.C
58
5932g 32opt 64g 64opt amd64: setup
60 cd $(BUILDTAG); $(MAKE) -f ../Makefile $(TARG)-$(BUILDTAG) ; cd ..
61
62clean:
63 -rm -rf $(OBJS) $(TARG) 32g 32opt 64g 64opt amd64
64
65setup: FRC
66 @echo rstzip3: making setup...
67 @for a in 32g 32opt 64g 64opt amd64; do \
68 if test -d $$a; then true; else mkdir $$a; fi; \
69 for f in $(ALLSRCS); do if test -L $$a/$$f; then unlink $$a/$$f; fi; ln -s ../$$f $$a/$$f; done; \
70 if [ "amd64" -eq "$$a" ]; then if test -L $$a/byteswap.s; then unlink $$a/byteswap.s; fi; ln -s ../../../rstf/byteswap.s $$a/byteswap.s; fi; \
71 done
72FRC:
73
74.KEEP_STATE: