-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
104 lines (87 loc) · 2.51 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#-------------------------------------------------------------------------
#
# Copyright (c) 2018 Rajit Manohar
#
# This program is free software; 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 2
# 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
#-------------------------------------------------------------------------
BINARY=chp2prs.$(EXT)
TARGETS=$(BINARY)
TARGETLIBS=libactchp2prspass_$(EXT).so
include config.mk
OBJS=main.o
SHOBJS=chp2prs_pass.os sdt.os basicsdt.os
ifdef expropt_INCLUDE
SHOBJS+=externoptsdt.os
endif
SRCS=$(OBJS:.o=.cc) $(SHOBJS:.os=.cc)
ifdef chp_opt_INCLUDE
CHPOPT=-lchpopt
else
CHPOPT=
endif
SUBDIRS=lib
include $(ACT_HOME)/scripts/Makefile.std
ifdef expropt_INCLUDE
EXPRLIB=-lexpropt_sh $(ACT_HOME)/lib/libabc.so
else
EXPRLIB=
endif
$(BINARY): $(LIB) $(OBJS) $(ACTDEPEND)
$(CXX) $(SH_EXE_OPTIONS) $(CFLAGS) $(OBJS) -o $(BINARY) $(CHPOPT) $(SHLIBACTPASS)
$(TARGETLIBS): $(SHOBJS)
$(ACT_HOME)/scripts/linkso $(TARGETLIBS) $(SHOBJS) $(SHLIBACTPASS) $(EXPRLIB)
testreps:
@if [ -d test -a -x test/repeat_unit.sh ]; \
then \
if [ -d "test/unit_tests/${unit}" ]; \
then \
(cd test; ./repeat_unit.sh); \
else \
echo "Error: make testreps unit={unit_test} [warning={0/1}]"; \
fi \
fi
debug: obj_main obj_cartographer obj_checkchp start_lldb
obj_chpexpr2verilog:
@if [ -d $(EXT) -a -f $(EXT)/externoptsdt.o ] ; \
then \
(mv $(EXT)/externoptsdt.o externoptsdt.o); \
fi
@if [ -d $(EXT) -a -f $(EXT)/syntesis_helper.o ] ; \
then \
(mv $(EXT)/syntesis_helper.o syntesis_helper.o); \
fi
obj_cartographer:
@if [ -d $(EXT) -a -f $(EXT)/cartographer.o ] ; \
then \
(mv $(EXT)/cartographer.o cartographer.o); \
fi
obj_main:
@if [ -d $(EXT) -a -f $(EXT)/main.o ] ; \
then \
(mv $(EXT)/main.o main.o); \
fi
obj_checkchp:
@if [ -d $(EXT) -a -f $(EXT)/check_chp.o ] ; \
then \
(mv $(EXT)/check_chp.o check_chp.o); \
fi
start_lldb:
@if [ -x ${BINARY} ] ; \
then \
(lldb ./$(BINARY)); \
fi
-include Makefile.deps