bllip-parser / second-stage / programs / eval-weights / Makefile

Full commit
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.  You may obtain
# a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
# License for the specific language governing permissions and limitations
# under the License.

SOURCES = data.c lmdata.c read-tree.l
TARGETS = eval-weights # best-indices best-parse best-parses compare-models pretty-print
OBJECTS = $(patsubst %.l,%.o,$(patsubst %.c,%.o,$(

CC = gcc

all: $(TARGETS)

compare-models: lmdata.o cephes.o compare-models.o
	$(CXX) $(LDFLAGS) $^ -o $@

eval-weights: lmdata.o eval-weights.o
	$(CXX) $(LDFLAGS) $^ -o $@ 

best-indices: data.o best-indices.o
	$(CXX) $(LDFLAGS) $^ -o $@

best-parse: best-parse.o read-tree.o sym.o
	$(CXX)  $(LDFLAGS) $^ -o $@

best-parses: best-parses.o read-tree.o sym.o
	$(CXX)  $(LDFLAGS) $^ -o $@

pretty-print: pretty-print.o read-tree.o sym.o
	$(CXX) $(LDFLAGS) $^ -o $@

	$(CXX) $(CXXFLAGS) -c -o read-tree.o read-tree.l
	flex read-tree.l

.PHONY: real-clean
real-clean: clean
	rm -fr $(TARGETS)

.PHONY: clean
	rm -fr *.d *.o *~ core

# this command tells GNU make to look for dependencies in *.d files
-include $(patsubst %.l,%.d,$(patsubst %.c,%.d,$(