File: Makefile.IN

package info (click to toggle)
graphviz 1.7.16-2
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 11,124 kB
  • ctags: 12,650
  • sloc: ansic: 131,002; sh: 7,483; makefile: 1,954; tcl: 1,760; yacc: 1,758; perl: 253; awk: 150; lex: 96
file content (54 lines) | stat: -rw-r--r-- 1,405 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
#   libexpr.a (short version) make file
#   Written by Emden R. Gansner (1 Mar 2001)

include ../../Config.mk
include ../../makearch/$(ARCH)

LOC_INCDIR=../include
LOC_LIBDIR=../lib

INCS = -I. -I$(LOC_INCDIR) -I../../cdt

OBJS = exparse.o excc.o excontext.o exdata.o exeval.o exexpr.o \
       exerror.o exopen.o exrewind.o extoken.o extype.o exzero.o

all : install

install : libexpr.a
	$(MKPATH) $(LOC_INCDIR)
	cp expr.h exparse.h $(LOC_INCDIR)
	$(MKPATH) $(LOC_LIBDIR)
	cp libexpr.a $(LOC_LIBDIR)
	-(ranlib $(LOC_LIBDIR)/libexpr.a; exit 0) >/dev/null 2>&1

libexpr.a : $(OBJS)
	$(AR) cr libexpr.a $(OBJS)

OBJS :  exlib.h expr.h exparse.h

exparse.o : exparse.c exgram.h

exeval.o exlexname.o : exop.h

exparse.c exparse.h : exparse.y
	$(YACC) -dtv exparse.y
	$(SED) "s/yy/ex/g" < y.tab.c | $(SED) "s/YY/EX/g" > tmp
	$(SED) "s/printf(/sfprintf(sfstderr,/g" < tmp > exparse.c
	echo "#ifndef _EXPARSE_H" > exparse.h
	echo "#define _EXPARSE_H" >> exparse.h
	$(SED) "s/yy/ex/g" < y.tab.h | $(SED) "s/YY/EX/g" >> exparse.h
	echo "#endif /* _EXPARSE_H */" >> exparse.h
	$(RM) tmp y.tab.c y.tab.h

exop.h : exparse.h
	echo "static const char* exop[] = {" > exop.h
	$(SED) -e '/^[ 	]*#[ 	]*define[ 	][ 	]*[A-Z]/!d' -e 's/^[ 	]*#[ 	]*define[ 	]*\([A-Z0-9_]*\).*/	"\1",/' < exparse.h >> exop.h
	echo "};" >> exop.h

clean : 
	$(RM) *.o

distclean : clean
	$(RM) y.output exparse.c exparse.h exop.h libexpr.a