forked from wrcad/xictools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
147 lines (122 loc) · 4.38 KB
/
Makefile.in
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#######################################################################
LOCATION = mrouter
#######################################################################
DATE = @DATE@
prefix = @prefix@
CC = @CC@
CXX = @CXX@
CFLAGS = @CFLAGS@ @PIC_OPT@
OSNAME = @OSNAME@
INSTALL = @INSTALL@
EXESUFFIX = @EXESUFFIX@
TOOLROOT = @TOOLROOT@
SOEXT = @SOEXT@
LIB_TARGET = libmrouter.$(SOEXT)
INSTALL_BIN = $(INSTALL) -s -c -m 0755
INSTALL_SCRIPT = $(INSTALL) -c -m 0755
INSTALL_LIB = $(INSTALL) -c -m 0644
INSTALL_LIB_RO = $(INSTALL) -c -m 0444
BASE = ../xt_base
SUBDIRS = def lef mrouter
all: lef def
@cd def; $(MAKE) CC="$(CC)" CXX="$(CXX)" CXXFLAGS="$(CFLAGS)"
@cd lef; $(MAKE) CC="$(CC)" CXX="$(CXX)" CXXFLAGS="$(CFLAGS)"
@cd mrouter; $(MAKE) depend; $(MAKE)
lef:
@tar xzf source.lefdef/lef*tar.Z
@patch -p0 < source.lefdef/lef.patch
def:
@tar xzf source.lefdef/def*tar.Z
@patch -p0 < source.lefdef/def.patch
clean:
-@for a in $(SUBDIRS); do \
if [ -d $$a ]; then \
(cd $$a; $(MAKE) clean); \
fi \
done
-@cd examples; $(MAKE) clean
distclean:
-@rm -rf lef def autom4te.cache config.cache config.status config.log \
Makefile
-@rm -f mrouter-`./version`.tar.gz
-@cd mrouter; $(MAKE) $@
-@cd examples; $(MAKE) $@
-@cd packages; $(MAKE) $@
depend:
@if [ ! -d lef ]; then \
$(MAKE) lef; \
fi
@if [ ! -d def ]; then \
$(MAKE) def; \
fi
@cd mrouter; $(MAKE) $@
@cd examples; $(MAKE) $@
test:
-cd mrouter; $(MAKE) test
#######################################################################
####### Install programs into system location #########################
INSTALL_PREFIX ?= $(prefix)
destn = $(INSTALL_PREFIX)/$(TOOLROOT)
install_mrouter: install_test install_clean install_bin \
install_lib install_help install_doc install_examples
install_bin: $(destn)/bin
install_lib: $(destn)/mrouter/lib
install_help: $(destn)/mrouter/help
install_examples: $(destn)/mrouter/examples
install_doc: $(destn)/mrouter/doc
install_test::
@if [ $(INSTALL_PREFIX) = $prefix ]; then \
echo "No! Use pagkage to install!"; \
exit 1; \
fi
install_clean::
-@rm -rf $(destn)
$(destn)/bin::
@$(BASE)/util/mkdirpth $(destn)/bin
$(INSTALL_BIN) mrouter/mrouter$(EXESUFFIX) $(destn)/bin;
$(destn)/mrouter/lib::
@$(BASE)/util/mkdirpth $(destn)/mrouter/lib
$(INSTALL_LIB) mrouter/$(LIB_TARGET) $@
$(destn)/mrouter/help::
@$(BASE)/util/mkdirpth $(destn)/mrouter/help
$(INSTALL_LIB_RO) doc/xic/MRouter.hlp $@
$(destn)/mrouter/doc::
@$(BASE)/util/mkdirpth $(destn)/mrouter/doc
# $(INSTALL_LIB_RO) doc/mrmanual-`./version`.pdf $@
# $(INSTALL_LIB_RO) doc/mrmanual-html-`./version`.tar.gz $@
# $(INSTALL_LIB_RO) doc/Makefile $@
# $(INSTALL_LIB_RO) doc/mrman1.tex $@
# $(INSTALL_LIB_RO) doc/mrman2.tex $@
# $(INSTALL_LIB_RO) doc/mrman3.tex $@
# $(INSTALL_LIB_RO) doc/mrmanual.sed $@
$(INSTALL_LIB_RO) doc/README $@
# $(INSTALL_LIB_RO) doc/README.build $@
# $(INSTALL_LIB_RO) doc/tm.eps $@
$(destn)/mrouter/examples::
@$(BASE)/util/mkdirpth $(destn)/mrouter/examples
$(INSTALL_LIB) examples/Makefile $@
$(INSTALL_LIB) examples/main-plg.cc $@
$(INSTALL_LIB) examples/map9v3.def $@
$(INSTALL_LIB) examples/map9v3_blk.def $@
$(INSTALL_LIB) examples/map9v3.rsc $@
$(INSTALL_LIB) examples/openMSP430.def $@
$(INSTALL_LIB) examples/openMSP430_blk.def $@
$(INSTALL_LIB) examples/openMSP430.rsc $@
$(INSTALL_LIB) examples/README $@
@$(BASE)/util/mkdirpth $(destn)/mrouter/examples/osu35
$(INSTALL_LIB) examples/osu35/osu035_stdcells.gds2 $@/osu35
$(INSTALL_LIB) examples/osu35/osu035_stdcells.lef $@/osu35
@$(BASE)/util/mkdirpth $(destn)/mrouter/examples/xic
$(INSTALL_LIB) examples/xic/exroute.scr $@/xic
$(INSTALL_LIB) examples/xic/osu35.lib $@/xic
$(INSTALL_LIB) examples/xic/README $@/xic
$(INSTALL_LIB) examples/xic/stdvia.scr $@/xic
$(INSTALL_LIB) examples/xic/stdvias $@/xic
$(INSTALL_LIB) examples/xic/xic_tech $@/xic
package::
$(MAKE) all
-rm -rf packages/root
mkdir packages/root
$(MAKE) INSTALL_PREFIX=packages/root$(prefix) install_mrouter
cd packages; $(MAKE) package
#######################################################################