Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / fnx / clib / report / GNUmakefile
CommitLineData
86530b38
AT
1# *************************************************************************
2#
3#
4# Creation Date : 2001
5#
6# Description : makefile for C++ ReportClass
7#
8#-------------------------------------------------------------------------------
9# Makefile for C++ ReportClass library
10#-------------------------------------------------------------------------------
11
12
13VERA_LIBDIR ?= ./lib
14
15pli = report
16
17cds_inc_dir = $(VCS_HOME)/include
18
19static_pli_tab = $(pli).tab
20static_pli_lib = $(VERA_LIBDIR)/$(pli).a
21static_pli_obj = $(VERA_LIBDIR)/report_pli.o \
22 $(VERA_LIBDIR)/report_pli_util.o
23
24dynamic_pli_lib = $(VERA_LIBDIR)/$(pli).so
25#dynamic_pli_obj = ./cc/veriuser.o $(static_pli_lib) # order matters
26
27dynamic_pli_obj = $(static_pli_lib)
28
29test_pli_obj = $(VERA_LIBDIR)/report_test.o
30
31#--------------------------------------------------------------------------------
32
33#ccflags = -fPIC -I./include -I$(cds_inc_dir) -g
34ccflags = -fpic -I./include -I$(cds_inc_dir) -g
35#cppflags = -fPIC -I./include -I$(cds_inc_dir) -g -pedantic
36cppflags = -fpic -I./include -I$(cds_inc_dir) -g -pedantic
37
38CCFLAGS = -KPIC -I./include -I$(cds_inc_dir) -dalign -xtarget=ultra #-xO4
39CPPFLAGS = -KPIC -I./include -I$(cds_inc_dir) -dalign -xtarget=ultra #-xO4
40
41report_cc_headers = ./include/Hash.h \
42 ./include/cReport.h \
43 ./include/report_info.h \
44 ./include/report_msg_format.h
45
46report_cc_src = Hash.cc \
47 cReport.cc
48
49#report_cc_obj = $(VERA_LIBDIR)/$(report_cc_src:.cc=.o)
50report_cc_obj = $(VERA_LIBDIR)/Hash.o \
51 $(VERA_LIBDIR)/cReport.o
52
53
54#--------------------------------------------------------------------------------
55
56.PHONY: all test
57all: $(static_pli_lib) $(dynamic_pli_lib)
58
59$(static_pli_lib) : $(static_pli_obj) $(static_pli_tab) $(report_cc_obj)
60 $(ar) rv $(static_pli_lib) $(static_pli_obj) $(report_cc_obj)
61
62ifeq ($(USE_CC),) # {
63$(dynamic_pli_lib) : $(dynamic_pli_obj)
64 $(ld) -G $(dynamic_pli_obj) -o $(dynamic_pli_lib)
65
66$(VERA_LIBDIR)/%.o: cc/%.cc
67 $(cpp) $(cppflags) -c $< -o $@
68
69$(VERA_LIBDIR)/%.o: cc/%.c
70 $(cc) $(ccflags) -c $< -o $@
71
72test : all $(test_pli_obj)
73 $(ld) $(test_pli_obj) $(static_pli_lib) -o test
74
75else # }{
76
77$(dynamic_pli_lib) : $(dynamic_pli_obj)
78 $(LD) -G $(dynamic_pli_obj) -o $(dynamic_pli_lib)
79
80$(VERA_LIBDIR)/%.o: cc/%.cc
81 $(CPP) $(CPPFLAGS) -c $< -o $@
82
83$(VERA_LIBDIR)/%.o: cc/%.c
84 $(CC) $(CCFLAGS) -c $< -o $@
85
86test : all $(test_pli_obj)
87 $(LD) $(test_pli_obj) $(static_pli_lib) -o test
88
89endif # }
90
91
92#clean clobber ::
93# $(RM) $(static_pli_obj) $(static_pli_lib)
94## $(RM) $(static_pli_obj) $(static_pli_lib) $(static_pli_tab)
95# $(RM) $(dynamic_pli_obj) $(dynamic_pli_lib)
96# $(RM) $(report_cc_obj)
97
98#-----------------------------------------------------------------------------
99# Get the common definitions if we haven't already
100#-----------------------------------------------------------------------------
101include $(DV_ROOT)/verif/env/fnx/runsim/makefiles/Makefile.defs
102#-----------------------------------------------------------------------------