Synopsis - Cross-Reference
File: /tests/Cxx/Makefile.in1# 2# Copyright (C) 2005 Stefan Seefeld 3# All rights reserved. 4# Licensed to the public under the terms of the GNU LGPL (>= 2), 5# see the file COPYING for details. 6# 7 8SHELL := /bin/sh 9 10srcdir := @srcdir@ 11builddir:= @builddir@ 12 13CXX := @CXX@ 14MAKEDEP := $(CXX) -M 15CPPFLAGS:= @CPPFLAGS@ 16CPPFLAGS+= -I $(builddir)/../../src/ -I $(srcdir)/../../src/ 17CXXFLAGS:= @CXXFLAGS@ 18LDFLAGS := @LDFLAGS@ 19LIBS := -L$(builddir)/../../src/lib -lSynopsis @LIBS@ 20 21TESTS := Lexer Encoding Parser ConstEvaluator SymbolLookup TypeAnalysis 22 23SRC := $(patsubst %, src/%.cc, $(TESTS)) 24OBJ := $(patsubst %.cc, %.o, $(SRC)) 25DEP := $(patsubst %.cc, %.d, $(SRC)) 26 27TARGETS := $(patsubst src/%.cc, bin/%, $(SRC)) 28 29vpath %.cc $(srcdir) 30 31all: $(TARGETS) 32 33$(TESTS): %: bin/% 34 35$(TARGETS): bin/%: src/%.o 36 $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) 37 38%.d: %.cc 39 @echo generating dependencies for $(@D)/$(<F) 40 $(SHELL) -ec '$(MAKEDEP) $(CPPFLAGS) $< | sed "s,$(*F)\\.o[ :]*,$*\\.d $*\\.o : ,g" > $@' 41 42%.o: %.cc 43 @echo compiling $(@D)/$(@F) 44 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< 45 46Makefile: $(srcdir)/Makefile.in 47 (cd .. && ./config.status --file OpenCxx/Makefile) 48 49clean : 50 rm -f bin/* src/*.o src/*.d 51 52ifeq (,$(filter $(MAKECMDGOALS), depend clean distclean)) 53-include $(DEP) 54endif