blob: 9e84d0f1f404ad1da85af953c26bd34f370387ad (
plain)
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
|
SRCS = mhmakeparser.y mhmakelexer.l mhmake.cpp mhmakefileparser.cpp util.cpp \
functions.cpp fileinfo.cpp rule.cpp md5.c build.cpp curdir.cpp
if DEBUG
bin_PROGRAMS=mhmake_dbg
mhmake_dbg_SOURCES = $(SRCS)
else
bin_PROGRAMS=mhmake
mhmake_SOURCES = $(SRCS)
endif
LEX=flex++
AM_LFLAGS=-8
YACC=bison++
AM_YFLAGS=-d
mhmakelexer.o: mhmakelexer.cpp mhmakelexer.h
mhmakelexer.cpp: mhmakelexer.l
mhmakelexer.h: mhmakelexer.l
mhmakeparser.o: mhmakeparser.cpp mhmakeparser.h
mhmakeparser.cpp: mhmakeparser.y
mhmakeparser.h: mhmakeparser.y
.l.cpp:
$(LEXCOMPILE) -S$(dir $<)flexskel.cc -H$(dir $<)flexskel.h -h$(@:%.cpp=%.h) -otemp1234.456 $<
echo '#include "stdafx.h"' > $@
cat temp1234.456 >> $@
rm temp1234.456
.y.cpp:
$(YACCCOMPILE) -S$(dir $<)bison.cc -H$(dir $<)bison.h -h$(@:%.cpp=%.h) -otemp1234.456 $<
echo '#include "stdafx.h"' > $@
cat temp1234.456 >> $@
rm temp1234.456
.l.h:
$(LEXCOMPILE) -S$(dir $<)flexskel.cc -H$(dir $<)flexskel.h -h$@ -otemp1234.456 $<
echo '#include "stdafx.h"' > $(@:%.h=%.cpp)
cat temp1234.456 >> $(@:%.h=%.cpp)
rm temp1234.456
.y.h:
$(YACCCOMPILE) -S$(dir $<)bison.cc -H$(dir $<)bison.h -h$@ -otemp1234.456 $<
echo '#include "stdafx.h"' > $(@:%.h=%.cpp)
cat temp1234.456 >> $(@:%.h=%.cpp)
rm temp1234.456
# set the include path found by configure
INCLUDES= $(all_includes)
LDADD = /usr/lib/libpopt.a
# the library search path.
if DEBUG
mhmake_dbg_LDFLAGS = $(all_libraries)
else
mhmake_LDFLAGS = $(all_libraries)
endif
|