File: Makefile.in

package info (click to toggle)
qrouter 1.3.57-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,312 kB
  • ctags: 945
  • sloc: ansic: 13,500; sh: 7,492; makefile: 133; tcl: 3
file content (145 lines) | stat: -rw-r--r-- 3,902 bytes parent folder | download
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
#
# qrouter Makefile
#

# Main compiler arguments
CFLAGS += @CFLAGS@
CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@
LIBS = @LIBS@
LDFLAGS += @LDFLAGS@
LDDL_FLAGS = @LDDL_FLAGS@
LD_RUN_PATH = @LD_RUN_PATH@
SHLIB_CFLAGS = @SHLIB_CFLAGS@
LIB_SPECS = @LIB_SPECS@
INC_SPECS = @INC_SPECS@
TCL_LIB_DIR = @TCL_LIB_DIR@
TK_LIB_DIR = @TK_LIB_DIR@
EXTRA_LIB_SPECS = @EXTRA_LIB_SPECS@
INSTALL = @INSTALL@
SHDLIB_EXT = @SHDLIB_EXT@
EXEEXT = @EXEEXT@
X_LIBS = @X_LIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
QROUTER_LIB_DIR = @QROUTER_LIB_DIR@
WISH_EXE = @WISH_EXE@
VERSION = @VERSION@
REVISION = @REVISION@
prefix = @prefix@

INSTALL_TARGET := @INSTALL_TARGET@
ALL_TARGET := @ALL_TARGET@

SOURCES = qrouter.c maze.c node.c qconfig.c lef.c def.c
OBJECTS := $(patsubst %.c,%.o,$(SOURCES))

SOURCES2 = graphics.c tclqrouter.c tkSimple.c
OBJECTS2 := $(patsubst %.c,%.o,$(SOURCES2))

SOURCES3 = qrouterexec.c
OBJECTS3 := $(patsubst %.c,%.o,$(SOURCES3))

SOURCES4 = qrouternullg.c
OBJECTS4 := $(patsubst %.c,%.o,$(SOURCES4))

SOURCES5 = main.c
OBJECTS5 := $(patsubst %.c,%.o,$(SOURCES5))

BININSTALL = ${prefix}/bin
LIBINSTALL = ${prefix}/${QROUTER_LIB_DIR}
EXTRA_DEFS = -DQROUTER_PATH=\"${LIBINSTALL}\"

all: $(ALL_TARGET)

install: $(INSTALL_TARGET)

nointerp: qrouter$(EXEEXT)

tcl: qrouter.sh qrouter.tcl qrouter$(SHDLIB_EXT) qrouterexec$(EXEEXT) \
	qrouternullg$(EXEEXT)

qrouter.tcl: qrouter.tcl.in
	sed -e '/LIBDIR/s#LIBDIR#${LIBINSTALL}#' \
	    -e '/VERSION/s#VERSION#${VERSION}#' \
	    -e '/REVISION/s#REVISION#${REVISION}#' \
		qrouter.tcl.in > $@

qrouter.sh: qrouter.sh.in
	sed -e '/WISH_EXE/s#WISH_EXE#${WISH_EXE}#' \
	    -e '/LIBDIR/s#LIBDIR#${LIBINSTALL}#' \
		qrouter.sh.in > $@
	chmod 0755 $@

qrouter$(EXEEXT): $(OBJECTS) $(OBJECTS5)
	$(CC) $(LDFLAGS) $(OBJECTS) $(OBJECTS5) -o $@ $(LIBS) -lm

qrouter$(SHDLIB_EXT): $(OBJECTS) $(OBJECTS2)
	$(RM) qrouter$(SHDLIB_EXT)
	$(CC) ${CFLAGS} ${SHLIB_CFLAGS} -o $@ \
		${LDDL_FLAGS} $(OBJECTS) $(OBJECTS2) \
		${LDFLAGS} -lc ${LIBS} ${X_PRE_LIBS} -lX11 ${X_LIBS} \
		${X_EXTRA_LIBS} ${LIB_SPECS} ${EXTRA_LIB_SPECS} -lm

qrouterexec$(EXEEXT): $(OBJECTS3)
	$(RM) qrouterexec$(EXEEXT)
	$(CC) ${CFLAGS} ${CPPFLAGS} ${DEFS} ${EXTRA_DEFS} \
		${SOURCES3} ${INC_SPECS} -o $@  ${LIB_SPECS} \
		${LD_RUN_PATH} ${LDFLAGS} ${X_PRE_LIBS} -lX11 ${X_LIBS} \
		${X_EXTRA_LIBS} ${LIBS} ${EXTRA_LIB_SPECS} -lm

qrouternullg$(EXEEXT): $(OBJECTS4)
	$(RM) qrouternullg$(EXEEXT)
	$(CC) ${CFLAGS} ${CPPFLAGS} ${DEFS} ${EXTRA_DEFS} \
		${SOURCES4} ${INC_SPECS} -o $@  ${LIB_SPECS} \
		${LD_RUN_PATH} ${LDFLAGS} ${LIBS} ${EXTRA_LIB_SPECS} -lm

install-nointerp:
	@echo "Installing qrouter"
	$(INSTALL) -d $(DESTDIR)${BININSTALL}
	$(INSTALL) qrouter $(DESTDIR)${BININSTALL}

install-tcl: qrouter.sh qrouter.tcl qrouter$(SHDLIB_EXT) \
		qrouterexec$(EXEEXT) qrouternullg$(EXEEXT)
	@echo "Installing qrouter"
	$(INSTALL) -d $(DESTDIR)${BININSTALL}
	$(INSTALL) -d $(DESTDIR)${LIBINSTALL}
	$(INSTALL) qrouter.sh $(DESTDIR)${BININSTALL}/qrouter
	$(INSTALL) qrouter$(SHDLIB_EXT) $(DESTDIR)${LIBINSTALL}
	$(INSTALL) qrouterexec$(EXEEXT) $(DESTDIR)${LIBINSTALL}
	$(INSTALL) qrouternullg$(EXEEXT) $(DESTDIR)${LIBINSTALL}
	$(INSTALL) -m 0644 console.tcl $(DESTDIR)${LIBINSTALL}
	$(INSTALL) -m 0644 qrouter.tcl $(DESTDIR)${LIBINSTALL}

uninstall:
	$(RM) $(DESTDIR)${BININSTALL}/qrouter

clean:
	$(RM) $(OBJECTS)
	$(RM) $(OBJECTS2)
	$(RM) $(OBJECTS3)
	$(RM) $(OBJECTS4)
	$(RM) $(OBJECTS5)
	$(RM) qrouterexec$(EXEEXT)
	$(RM) qrouternullg$(EXEEXT)
	$(RM) qrouter$(EXEEXT)
	$(RM) qrouter$(SHDLIB_EXT)
	$(RM) qrouter.tcl
	$(RM) qrouter.sh

veryclean:
	$(RM) $(OBJECTS)
	$(RM) $(OBJECTS2)
	$(RM) $(OBJECTS3)
	$(RM) $(OBJECTS4)
	$(RM) $(OBJECTS5)
	$(RM) qrouterexec$(EXEEXT)
	$(RM) qrouternullg$(EXEEXT)
	$(RM) qrouter$(EXEEXT)
	$(RM) qrouter$(SHDLIB_EXT)
	$(RM) qrouter.tcl
	$(RM) qrouter.sh

.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) $(SHLIB_CFLAGS) $(DEFS) \
		$(EXTRA_DEFS) $(INC_SPECS) -c $< -o $@