3 # ------------------------------------------------
4 # Copyright 2014 AT&T Intellectual Property
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # -------------------------------------------
24 INCLUDES = -I../../include -I../../include/hfta
25 LDLIBS = -L../../lib -lm # -lgscphostaux
26 C++OPTS = -ggdb -D_BSD_SIGNALS $(INCLUDES) -DPREFILTER_OK -std=c++11
34 #CC_EXECUTABLE_FLAG = -o
38 TARGETS = translate_fta gen_tuple_access
39 SRCS = $(TARGETS:=.cpp)
41 # we need to suppress writable strings warnings on Mac for flex/bison generated C++ code
44 WARN=-Wno-deprecated-writable-strings
47 WARN=-Wno-write-strings
50 all: translate_fta gen_tuple_access interfacelib.a
51 cp interfacelib.a ../../lib/libgscpinterface.a ; ranlib ../../lib/libgscpinterface.a
53 default_targets: $(TARGETS)
56 $(CXX) $(CPPFLAGS) $(WARN) $(INCLUDES) -c $< -o $@
59 $(CXX) $(CPPFLAGS) $(WARN) $(INCLUDES) -c $< -o $@
62 $(CXX) $(CPPFLAGS) $(INCLUDES) -c $< -o $@
64 #FTA_OBJECTS:=analyze_fta.o ext_fcns.tab.o ext_fcnslexer.o fta.tab.o ftalexer.o generate_lfta_code.o generate_utils.o parse_schema.o query_plan.o stream_query.o translate_fta.o type_objects.o iface_q.o ifq.tab.o ifqlexer.o res.tab.o reslexer.o niclexer.o nic_def.o nic.tab.o generate_nic_code.o partn.tab.o partnlexer.o niclexer.o parse_partn.o xmllexer.o xml.tab.o field_list.o
67 FTA_OBJECTS:=analyze_fta.o ext_fcns.tab.o ext_fcnslexer.o fta.tab.o ftalexer.o generate_lfta_code.o generate_utils.o parse_schema.o query_plan.o stream_query.o translate_fta.o type_objects.o iface_q.o ifq.tab.o ifqlexer.o res.tab.o reslexer.o nic_def.o nic.tab.o generate_nic_code.o partn.tab.o partnlexer.o niclexer.o parse_partn.o xmllexer.o xml.tab.o field_list.o
70 GEN_OBJECTS:=fta.tab.o ftalexer.o generate_utils.o parse_schema.o gen_tuple_access.o type_objects.o
72 LIB_OBJECTS:=fta.tab.o ftalexer.o parse_schema.o type_objects.o schemaparser.o
74 translate_fta: $(FTA_OBJECTS)
75 $(CXX) $(CC_ARGS) $(LDLIBS) $(CC_EXECUTABLE_FLAG) $(FTA_OBJECTS) -o $@
77 gen_tuple_access: $(GEN_OBJECTS)
78 $(CXX) $(CC_ARGS) $(LDLIBS) $(CC_EXECUTABLE_FLAG) $(GEN_OBJECTS) -o $@
80 interfacelib.a: $(LIB_OBJECTS)
81 ar -r $@ $(LIB_OBJECTS)
83 #interfacelib.a: fta.tab.o ftalexer.o parse_schema.o type_objects.o schemaparser.o
87 test_interfacelib: test_interfacelib.o interfacelib.a
88 $(CXX) $(CC_ARGS) $(LDLIBS) $(CC_EXECUTABLE_FLAG) $(LIB_OBJECTS) $@
90 test_interfacelib.cc : schemaparser.h schemaparser_impl.h
92 # translate_fta source files
93 translate_fta.cc : parse_fta.h parse_schema.h parse_ext_fcns.h analyze_fta.h query_plan.h generate_lfta_code.h stream_query.h generate_utils.h nic_def.h generate_nic_code.h parse_partn.h print_plan.h
95 analyze_fta.cc : parse_fta.h parse_schema.h parse_ext_fcns.h analyze_fta.h type_objects.h
97 ext_fcnslexer.cc : parse_ext_fcns.h ext_fcns.tab.cc.h
99 fta.tab.cc : parse_fta.h parse_schema.h
101 ftalexer.cc : parse_fta.h parse_schema.h fta.tab.cc.h
103 generate_lfta_code.cc : parse_fta.h parse_schema.h analyze_fta.h generate_utils.h query_plan.h generate_lfta_code.h generate_nic_code.h
105 generate_utils.cc : generate_utils.h ../../include/lapp.h
107 parse_schema.cc : parse_fta.h parse_schema.h type_objects.h
109 query_plan.cc : query_plan.h analyze_fta.h generate_utils.h
111 stream_query.cc : stream_query.h generate_utils.h analyze_fta.h
113 type_objects.cc : type_objects.h
115 iface_q.cc : iface_q.h
117 ifq.tab.cc : parse_fta.h
119 ifqlexer.cc : parse_fta.h ifq.tab.cc.h
121 res.tab.cc : iface_q.h
123 reslexer.cc : parse_fta.h res.tab.cc.h
125 niclexer.cc : nic_def.h nic.tab.cc.h
127 nic_def.cc : nic_def.h
129 nic.tab.cc : nic_def.h
131 generate_nic_code.cc : parse_fta.h parse_schema.h analyze_fta.h generate_utils.h query_plan.h generate_nic_code.h analyze_fta.h
133 partn.tab.cc : parse_partn.h
135 partnlexer.cc : parse_partn.h partn.tab.cc.h
137 niclexer.cc : nic_def.h nic.tab.cc.h
139 parse_partn.cc : parse_partn.h parse_schema.h analyze_fta.h
141 xmllexer.cc : parse_fta.h xml.tab.hh
145 field_list.cc : xml_t.h field_list.h
147 # gen_tuple_access source files
148 schemaparser.cc : schemaparser_impl.h ../../include/schemaparser.h parse_fta.h parse_schema.h generate_utils.h ../../include/hfta/host_tuple.h ../../include/lapp.h
151 rm -f *.o core $(TARGETS) ./ii_files/*.ii interfacelib.a ../../bin/gen_tuple_access ../../bin/translate_fta
154 rm -f core $(TARGETS)
157 rm -f *.o *.a core driver ./ii_files/*.ii
160 cp translate_fta ../../bin/ ; cp gen_tuple_access ../../bin/ ; cp interfacelib.a ../../lib/libgscpinterface.a ; ranlib ../../lib/libgscpinterface.a
162 # DO NOT DELETE THIS LINE -- make depend depends on it.