Commit | Line | Data |
---|---|---|
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 | ||
13 | VERA_LIBDIR ?= ./lib | |
14 | ||
15 | pli = report | |
16 | ||
17 | cds_inc_dir = $(VCS_HOME)/include | |
18 | ||
19 | static_pli_tab = $(pli).tab | |
20 | static_pli_lib = $(VERA_LIBDIR)/$(pli).a | |
21 | static_pli_obj = $(VERA_LIBDIR)/report_pli.o \ | |
22 | $(VERA_LIBDIR)/report_pli_util.o | |
23 | ||
24 | dynamic_pli_lib = $(VERA_LIBDIR)/$(pli).so | |
25 | #dynamic_pli_obj = ./cc/veriuser.o $(static_pli_lib) # order matters | |
26 | ||
27 | dynamic_pli_obj = $(static_pli_lib) | |
28 | ||
29 | test_pli_obj = $(VERA_LIBDIR)/report_test.o | |
30 | ||
31 | #-------------------------------------------------------------------------------- | |
32 | ||
33 | #ccflags = -fPIC -I./include -I$(cds_inc_dir) -g | |
34 | ccflags = -fpic -I./include -I$(cds_inc_dir) -g | |
35 | #cppflags = -fPIC -I./include -I$(cds_inc_dir) -g -pedantic | |
36 | cppflags = -fpic -I./include -I$(cds_inc_dir) -g -pedantic | |
37 | ||
38 | CCFLAGS = -KPIC -I./include -I$(cds_inc_dir) -dalign -xtarget=ultra #-xO4 | |
39 | CPPFLAGS = -KPIC -I./include -I$(cds_inc_dir) -dalign -xtarget=ultra #-xO4 | |
40 | ||
41 | report_cc_headers = ./include/Hash.h \ | |
42 | ./include/cReport.h \ | |
43 | ./include/report_info.h \ | |
44 | ./include/report_msg_format.h | |
45 | ||
46 | report_cc_src = Hash.cc \ | |
47 | cReport.cc | |
48 | ||
49 | #report_cc_obj = $(VERA_LIBDIR)/$(report_cc_src:.cc=.o) | |
50 | report_cc_obj = $(VERA_LIBDIR)/Hash.o \ | |
51 | $(VERA_LIBDIR)/cReport.o | |
52 | ||
53 | ||
54 | #-------------------------------------------------------------------------------- | |
55 | ||
56 | .PHONY: all test | |
57 | all: $(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 | ||
62 | ifeq ($(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 | ||
72 | test : all $(test_pli_obj) | |
73 | $(ld) $(test_pli_obj) $(static_pli_lib) -o test | |
74 | ||
75 | else # }{ | |
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 | ||
86 | test : all $(test_pli_obj) | |
87 | $(LD) $(test_pli_obj) $(static_pli_lib) -o test | |
88 | ||
89 | endif # } | |
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 | #----------------------------------------------------------------------------- | |
101 | include $(DV_ROOT)/verif/env/fnx/runsim/makefiles/Makefile.defs | |
102 | #----------------------------------------------------------------------------- |