summaryrefslogtreecommitdiff
path: root/components/rtgui/utils/perfect_hash/example-C++/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'components/rtgui/utils/perfect_hash/example-C++/Makefile')
-rw-r--r--components/rtgui/utils/perfect_hash/example-C++/Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/components/rtgui/utils/perfect_hash/example-C++/Makefile b/components/rtgui/utils/perfect_hash/example-C++/Makefile
new file mode 100644
index 0000000000..de525f5d5d
--- /dev/null
+++ b/components/rtgui/utils/perfect_hash/example-C++/Makefile
@@ -0,0 +1,31 @@
+
+CXX = g++ -Wall
+
+
+lookup: main.o states-code.o
+ $(CXX) -o $@ $^
+
+
+main.o: main.cc states-code.hh
+ $(CXX) -c $<
+
+
+states-code.o: states-code.cc states-code.hh states.dat.h
+ $(CXX) -c $<
+
+
+states-code.cc: states.dat states-tmpl.cc states-code.hh
+ ../perfect_hash.py --splitby '|' --keycol 2 states.dat states-tmpl.cc
+
+
+states.dat.h: states.dat
+ ./mk_header.py >$@
+
+
+clean:
+ rm lookup *.o states.dat.h states-code.cc
+
+
+test:
+ ./lookup 'NY'
+ ./lookup 'QW'