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 (66 lines) | stat: -rw-r--r-- 2,465 bytes parent folder | download | duplicates (2)
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
#
# rcsid $Header: /usr/cvsroot/magic-7.5/magic/Makefile,v 1.1.1.1 2006/04/10 22:03:13 tim Exp $
#

MODULE   = magic
MAGICDIR = ..
SRCS     = magicTop.c

include ${MAGICDIR}/defs.mak

EXTRA_LIBS = ${MAGICDIR}/cmwind/libcmwind.o ${MAGICDIR}/commands/libcommands.o \
	    ${MAGICDIR}/database/libdatabase.o ${MAGICDIR}/dbwind/libdbwind.o \
	    ${MAGICDIR}/drc/libdrc.o ${MAGICDIR}/debug/libdebug.o \
	    ${MAGICDIR}/extract/libextract.o ${MAGICDIR}/graphics/libgraphics.o \
	    ${MAGICDIR}/select/libselect.o ${MAGICDIR}/textio/libtextio.o \
	    ${MAGICDIR}/tiles/libtiles.o ${MAGICDIR}/windows/libwindows.o \
	    ${MAGICDIR}/wiring/libwiring.o ${MAGICDIR}/resis/libresis.o \
	    ${MAGICDIR}/sim/libsim.o ${MAGICDIR}/netmenu/libnetmenu.o \
	    ${MAGICDIR}/plow/libplow.o ${MAGICDIR}/utils/libutils.o \
	    ${MAIN_EXTRA_LIBS}

BITMAPS = up.xbm down.xbm left.xbm right.xbm zoom.xbm
DEST_XBM = $(BITMAPS:%=$(DESTDIR)/usr/share/magic/bitmaps/%)

DFLAGS += -DMAGIC_DATE="\"`date`\""
LIBS   += ${GR_LIBS} ${READLINE_LIBS} -lm ${LD_EXTRA_LIBS} \
		${OA_LIBS} ${TOP_EXTRA_LIBS}
CLEANS += tclmagic${SHDLIB_EXT} libtclmagic${SHDLIB_EXT}.a proto.magicrc

main: magic proto.magicrc

tcl-main: tclmagic${SHDLIB_EXT} proto.magicrc

tclmagic${SHDLIB_EXT}: ${EXTRA_LIBS}
	@echo --- making magic Tcl library \(tclmagic${SHDLIB_EXT}\)
	${RM} tclmagic${SHDLIB_EXT}
	${CC} ${CFLAGS} ${CPPFLAGS} -o $@ ${LDDL_FLAGS} ${LD_RUN_PATH} \
		${EXTRA_LIBS} -lc ${LIBS}

proto.magicrc: proto.magicrc.m4
	sed -e /CAD_DIR/s%CAD_DIR%${LIBDIR}%g proto.magicrc.m4 | \
		${M4} ${GR_DFLAGS} ${DFLAGS} > proto.magicrc

install: $(DESTDIR)${BINDIR}/${MODULE}${EXEEXT} $(DESTDIR)${SYSDIR}/.magicrc \
	$(DESTDIR)${SYSDIR}/magicps.pro

install-tcl: $(DESTDIR)${TCLDIR}/tclmagic${SHDLIB_EXT} $(DESTDIR)${SYSDIR}/.magicrc \
	$(DESTDIR)${SYSDIR}/magicps.pro ${DEST_XBM}

$(DESTDIR)${TCLDIR}/tclmagic${SHDLIB_EXT}: tclmagic${SHDLIB_EXT}
	${RM} $(DESTDIR)${TCLDIR}/tclmagic${SHDLIB_EXT}
	${CP} tclmagic${SHDLIB_EXT} $(DESTDIR)${TCLDIR}/tclmagic${SHDLIB_EXT}

$(DESTDIR)/usr/share/magic/bitmaps/%: bitmaps/%
	${RM} $(DESTDIR)/usr/share/magic/bitmaps/$*
	${CP} bitmaps/$* $(DESTDIR)/usr/share/magic/bitmaps/$*

$(DESTDIR)${SYSDIR}/.magicrc: proto.magicrc
	${RM} $(DESTDIR)${SYSDIR}/.magicrc
	${CP} proto.magicrc $(DESTDIR)${SYSDIR}/.magicrc

$(DESTDIR)${SYSDIR}/magicps.pro: magicps.pro
	${RM} $(DESTDIR)${SYSDIR}/magicps.pro
	${CP} magicps.pro $(DESTDIR)${SYSDIR}/magicps.pro

include ${MAGICDIR}/rules.mak