aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/Makefile.am
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-29 09:17:47 +0000
committermarha <marha@users.sourceforge.net>2009-07-29 09:17:47 +0000
commit437bca524595d1007f37988e862db8bfeff329b0 (patch)
treeda106b22babce6ccd53c7dd9c3040aed4a52f455 /tools/mhmake/src/Makefile.am
parent6f45caf0fe3e94a83835fa1f5d04233b9e936efc (diff)
downloadvcxsrv-437bca524595d1007f37988e862db8bfeff329b0.tar.gz
vcxsrv-437bca524595d1007f37988e862db8bfeff329b0.tar.bz2
vcxsrv-437bca524595d1007f37988e862db8bfeff329b0.zip
Added mhmake GNU make compatible (with extensions) make utility.
Diffstat (limited to 'tools/mhmake/src/Makefile.am')
-rw-r--r--tools/mhmake/src/Makefile.am61
1 files changed, 61 insertions, 0 deletions
diff --git a/tools/mhmake/src/Makefile.am b/tools/mhmake/src/Makefile.am
new file mode 100644
index 000000000..9e84d0f1f
--- /dev/null
+++ b/tools/mhmake/src/Makefile.am
@@ -0,0 +1,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