1 # Hey, emacs, this is a -*- makefile -*-
3 # Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
5 # Author: Goetz Lindenmaier
7 # Makefile for ir -- intermediate representation of the program
10 CFLAGS = -pipe -Wall # -ansi -pedantic
18 INCLUDES = -I../adt -I../common -I../debug -I../ident -I../include \
19 -I../ir -I../tr -I../tv
25 DISTRIBMEMBERS = ircons.m irdump.m irflag.m irgmod.m irgraph.m irgopt.m \
26 irgwalk.m irmode.m irnode.m irop.m iropt.m irprog.m irvrfy.m
27 MEMBERS = $(DISTRIBMEMBERS)
29 CFILES = $(MEMBERS:.m=.c)
31 HFILES = $(MEMBERS:.m=.h)
32 HFILES += array.h common.h cookies.h debug.h entity.h gmp.h \
33 host.h ident.h label.h misc.h obst.h pdeq.h pset.h \
34 set.h tune.h tv.h type.h xprintf.h xp_help.h irnode2.h
36 DISTRIB = $(DISTRIBMEMBERS:.m=.h)
38 OFILES = $(MEMBERS:%.m=../objects/%.o)
40 DFILES = $(MEMBERS:.m=.d)
44 .PHONY: default all clean realclean install depend
45 .SUFFIXES: .d .h .c .o
47 .SILENT: $(DFILES) clean # hides output
50 $(TARGET): $(DFILES) $(OFILES)
52 # the preprocessor computes the dependencies and saves them to a file
53 # the sed script adds the path to ../objects and file.d to the dependency.
55 $(SHELL) -ec '$(CXX) $(DEPENDFLAGS) $(INCLUDES) $(X_INCLUDES) $< | sed '\''s/\($*\)\.o[ :]*/\.\.\/objects\/\1.o $@ : /g'\'' > $@'
59 $(CXX) $(CFLAGS) $(CXXFLAGS) $(COPTFLAGS) $(INCLUDES) $(X_INCLUDES) -c $< -o $@
62 cp $(DISTRIB) ../../include
65 rm -f $(OFILES) $(DFILES)
68 rm -f $(TARGET) *.flc TAGS