3
# This file is part of FreeRCT.
4
# FreeRCT is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
5
# FreeRCT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
6
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with FreeRCT. If not, see <http://www.gnu.org/licenses/>.
19
CXXFILES=ast.cpp check_data.cpp ../getoptdata.cpp image.cpp file_writing.cpp \
20
nodes.cpp parser.cpp rcdgen.cpp scanner.cpp scanner_funcs.cpp
22
OBJDIR=../objects/rcdgen
23
OBJFILES=$(addprefix $(OBJDIR)/,$(CXXFILES:.cpp=.o))
24
DEPEND=$(OBJDIR)/depend-rcdgen.txt
28
$(TARGET): $(DEPEND) $(OBJFILES)
29
$(CXX) $(CXXFLAGS) -o $(TARGET) $(OBJFILES) $(LIBS)
32
$(CXX) -c $(CXXFLAGS) -o $@ $(INCLUDES) $<
34
$(DEPEND): $(CXXFILES)
35
for f in $(CXXFILES);\
36
do $(CXX) -MM $(CXXFLAGS) $(INCLUDES) $$f;\
40
for i in $(OBJFILES) $(DEPEND) $(TARGET);\
41
do if test -f $$i; then rm $$i; fi;\
44
tokens.h parser.cpp: parser.y
45
$(BISON) --defines=tokens.h --output=parser.cpp parser.y
47
scanner.cpp scanner.h: scanner.l
48
$(FLEX) --outfile=scanner.cpp scanner.l