File: Makefile

package info (click to toggle)
magic 7.5.220-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 17,860 kB
file content (85 lines) | stat: -rw-r--r-- 2,557 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
#
# rcsid $Header: /usr/cvsroot/magic-7.5/tcltk/Makefile,v 1.10 2009/05/29 13:54:55 tim Exp $
#

MODULE   = tcltk
MAGICDIR = ..
SRCS = tclmagic.c

include ${MAGICDIR}/defs.mak

DFLAGS += -DMAGIC_DATE="\"`date`\""
CLEANS += magic.sh magic.tcl magicexec magicdnull

TCL_FILES = \
	tkcon.tcl \
	tkshell.tcl \
	wrapper.tcl \
	console.tcl \
	techbuilder.tcl \
	tools.tcl \
	mazeroute.tcl \
	strip_reflibs.tcl \
	toolkit.tcl \
	magic.tcl

BIN_FILES = \
	$(DESTDIR)${BINDIR}/magic.sh \
	$(DESTDIR)${BINDIR}/ext2spice.sh \
	$(DESTDIR)${BINDIR}/ext2sim.sh

tcl-main: magicexec magicdnull magic.tcl magic.sh ext2spice.sh ext2sim.sh

install-tcl: magicexec magicdnull ${BIN_FILES} ${TCL_FILES}
	${RM} $(DESTDIR)${TCLDIR}/magicexec
	${CP} magicexec $(DESTDIR)${TCLDIR}/magicexec
	${RM} $(DESTDIR)${TCLDIR}/magicdnull
	${CP} magicdnull $(DESTDIR)${TCLDIR}/magicdnull
	(cd $(DESTDIR)${TCLDIR}; ${RM} ${TCL_FILES})
	for i in ${TCL_FILES}; do \
		${CP} $$i $(DESTDIR)${TCLDIR}; done
	(cd $(DESTDIR)${TCLDIR}; chmod 0755 tkcon.tcl tkshell.tcl)

magicexec: magicexec.c
	${CC} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} magicexec.c -o magicexec \
		${LD_RUN_PATH} ${LIBS} ${LIB_SPECS}

magicdnull: magicdnull.c
	${CC} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} magicdnull.c -o magicdnull \
		${LD_RUN_PATH} ${LIBS} ${LIB_SPECS}

magic.tcl: magic.tcl.in ${MAGICDIR}/defs.mak
	sed -e /TCL_DIR/s%TCL_DIR%${TCLDIR}%g  \
            -e /SHDLIB_EXT/s%SHDLIB_EXT%${SHDLIB_EXT}%g magic.tcl.in > magic.tcl

magic.sh: magic.sh.in ${MAGICDIR}/defs.mak
	sed -e /TCL_DIR/s%TCL_DIR%${TCLDIR}%g \
	    -e /TCLLIB_DIR/s%TCLLIB_DIR%${TCL_LIB_DIR}%g \
	    -e /WISH_EXE/s%WISH_EXE%${WISH_EXE}%g magic.sh.in > magic.sh

ext2spice.sh: ext2spice.sh.in ${MAGICDIR}/defs.mak
	sed -e /TCL_DIR/s%TCL_DIR%${TCLDIR}%g ext2spice.sh.in > ext2spice.sh

ext2sim.sh: ext2sim.sh.in ${MAGICDIR}/defs.mak
	sed -e /TCL_DIR/s%TCL_DIR%${TCLDIR}%g ext2sim.sh.in > ext2sim.sh

$(DESTDIR)${TCLDIR}/%: %
	${RM} $(DESTDIR)${TCLDIR}/$*
	${CP} $* $(DESTDIR)${TCLDIR}/$*

$(DESTDIR)${BINDIR}/magic.sh: magic.sh
	${RM} $(DESTDIR)${BINDIR}/magic.sh $(DESTDIR)${BINDIR}/magic
	${CP} magic.sh $(DESTDIR)${BINDIR}/magic
	(cd $(DESTDIR)${BINDIR}; chmod 0755 magic)

$(DESTDIR)${BINDIR}/ext2spice.sh: ext2spice.sh
	${RM} $(DESTDIR)${BINDIR}/ext2spice
	${CP} ext2spice.sh $(DESTDIR)${BINDIR}/ext2spice
	(cd $(DESTDIR)${BINDIR}; chmod 0755 ext2spice)

$(DESTDIR)${BINDIR}/ext2sim.sh: ext2sim.sh
	${RM} $(DESTDIR)${BINDIR}/ext2sim
	${CP} ext2sim.sh $(DESTDIR)${BINDIR}/ext2sim
	(cd $(DESTDIR)${BINDIR}; chmod 0755 ext2sim)

include ${MAGICDIR}/rules.mak