1 | # $Id: Makefile.in,v 1.30 2011/01/16 11:59:37 ragge Exp $
|
---|
2 | #
|
---|
3 | # Makefile.in for cpp
|
---|
4 | #
|
---|
5 | VPATH=@srcdir@
|
---|
6 | srcdir=@srcdir@
|
---|
7 | top_srcdir=@top_srcdir@
|
---|
8 | builddir=@builddir@
|
---|
9 | top_builddir=@top_builddir@
|
---|
10 | XFL=-DCPP_DEBUG
|
---|
11 |
|
---|
12 | prefix = @prefix@
|
---|
13 | exec_prefix = @exec_prefix@
|
---|
14 | bindir = @bindir@
|
---|
15 | libexecdir = @libexecdir@
|
---|
16 | datarootdir = @datarootdir@
|
---|
17 | mandir = @mandir@
|
---|
18 | strip = @strip@
|
---|
19 | CC = @CC@
|
---|
20 | EXEEXT = @EXEEXT@
|
---|
21 | CFLAGS = @CFLAGS@ @ADD_CFLAGS@
|
---|
22 | CPPFLAGS = @CPPFLAGS@ @ADD_CPPFLAGS@ ${XFL} -I${srcdir} -I${top_builddir} -I${builddir} -I${MIPDIR} -I${MDIR}
|
---|
23 | LIBS = @LIBS@
|
---|
24 | LDFLAGS = @LDFLAGS@
|
---|
25 | LEX = @LEX@
|
---|
26 | YACC = @YACC@
|
---|
27 | INSTALL = @INSTALL@
|
---|
28 | INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
---|
29 | TARGMACH = @targmach@
|
---|
30 |
|
---|
31 | OBJS=cpp.o cpy.o token.o compat.o
|
---|
32 | HEADERS=cpp.h
|
---|
33 | DEST=@BINPREFIX@cpp$(EXEEXT)
|
---|
34 |
|
---|
35 | MIPDIR=$(top_srcdir)/mip
|
---|
36 | MDIR=$(top_srcdir)/arch/$(TARGMACH)
|
---|
37 |
|
---|
38 | all: ${DEST}
|
---|
39 |
|
---|
40 | ${DEST}: $(OBJS) $(HEADERS)
|
---|
41 | $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
|
---|
42 |
|
---|
43 | .c.o:
|
---|
44 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
|
---|
45 |
|
---|
46 | .l.o:
|
---|
47 | $(LEX) $(LFLAGS) $<
|
---|
48 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ lex.yy.c
|
---|
49 |
|
---|
50 | .y.o:
|
---|
51 | $(YACC) -d $(YFLAGS) $<
|
---|
52 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ y.tab.c
|
---|
53 |
|
---|
54 | compat.o: $(MIPDIR)/compat.c
|
---|
55 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MIPDIR)/compat.c
|
---|
56 |
|
---|
57 | $(OBJS): $(HEADERS)
|
---|
58 |
|
---|
59 | cpp.o: cpy.o
|
---|
60 | token.o: cpy.o
|
---|
61 |
|
---|
62 | test:
|
---|
63 | ./cpp < tests/test1 > tests/run1
|
---|
64 | cmp tests/run1 tests/res1
|
---|
65 | ./cpp < tests/test2 > tests/run2
|
---|
66 | cmp tests/run2 tests/res2
|
---|
67 | ./cpp < tests/test3 > tests/run3
|
---|
68 | cmp tests/run3 tests/res3
|
---|
69 | ./cpp < tests/test4 > tests/run4
|
---|
70 | cmp tests/run4 tests/res4
|
---|
71 | ./cpp < tests/test5 > tests/run5
|
---|
72 | cmp tests/run5 tests/res5
|
---|
73 | ./cpp < tests/test6 > tests/run6
|
---|
74 | cmp tests/run6 tests/res6
|
---|
75 | ./cpp < tests/test7 > tests/run7
|
---|
76 | cmp tests/run7 tests/res7
|
---|
77 | ./cpp < tests/test8 > tests/run8
|
---|
78 | cmp tests/run8 tests/res8
|
---|
79 | ./cpp < tests/test9 > tests/run9
|
---|
80 | cmp tests/run9 tests/res9
|
---|
81 | ./cpp < tests/test10 > tests/run10
|
---|
82 | cmp tests/run10 tests/res10
|
---|
83 | ./cpp < tests/test11 > tests/run11
|
---|
84 | cmp tests/run11 tests/res11
|
---|
85 | ./cpp < tests/test12 > tests/run12
|
---|
86 | cmp tests/run12 tests/res12
|
---|
87 | ./cpp < tests/test13 > tests/run13
|
---|
88 | cmp tests/run13 tests/res13
|
---|
89 |
|
---|
90 |
|
---|
91 | install:
|
---|
92 | test -z "${DESTDIR}$(libexecdir)" || mkdir -p "${DESTDIR}$(libexecdir)"
|
---|
93 | ${INSTALL_PROGRAM} ${DEST} ${DESTDIR}${libexecdir}
|
---|
94 | @if [ ${strip} = yes ]; then \
|
---|
95 | strip ${DESTDIR}${libexecdir}/${DEST} ; \
|
---|
96 | echo strip ${DESTDIR}${libexecdir}/${DEST} ; \
|
---|
97 | fi
|
---|
98 | test -z "${DESTDIR}$(mandir)/man1" || mkdir -p "${DESTDIR}$(mandir)/man1"
|
---|
99 | ${INSTALL} $(srcdir)/cpp.1 ${DESTDIR}${mandir}/man1/$(DEST).1
|
---|
100 |
|
---|
101 | clean:
|
---|
102 | /bin/rm -f $(OBJS) $(DEST) lex.yy.c y.tab.[ch] tests/run*
|
---|
103 |
|
---|
104 | distclean: clean
|
---|
105 | /bin/rm -f Makefile
|
---|