Rimproved interface to type array.
[libfirm] / ir / tr / Makefile
1 # Hey, emacs, this is a -*- makefile -*-
2 #
3 # Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
4 # All rights reserved.
5 # Author: Goetz Lindenmaier
6 #
7 # Makefile for tr -- the type representation
8
9 CXX         = gcc
10 CFLAGS      = -pipe -Wall # -ansi -pedantic
11 CXXFLAGS    = # -g
12 COPTFLAGS   = -O3
13 LDFLAGS     =
14 DEPENDFLAGS = -M
15 LIBPATH     =
16 LIBS        =
17 X_LIBS      =
18 INCLUDES    = -I../adt -I../common -I../debug -I../ident -I../include \
19               -I../ir -I../tr -I../tv
20 X_INCLUDES  =
21
22 SHELL       = /bin/sh
23 MAKE        = /usr/bin/make
24
25 DISTRIBMEMBERS   = entity.m type.m typewalk.m tpop.m
26 MEMBERS  =  $(DISTRIBMEMBERS) mangle.m
27
28 CFILES = $(MEMBERS:.m=.c)
29
30 HFILES = $(MEMBERS:.m=.h)
31 HFILES +=  type_or_entity.h
32 HFILES +=  common.h debug.h gmp.h host.h ident.h irgraph.h  \
33            irgwalk.h irmode.h irnode.h irop.h label.h misc.h \
34            obst.h pset.h set.h tv.h xprintf.h xp_help.h entity_t.h \
35            type_t.h tpop_t.h
36
37 DISTRIB = $(DISTRIBMEMBERS:.m=.h)
38 DISTRIB += type_or_entity.h
39
40 OFILES = $(MEMBERS:%.m=../objects/%.o)
41
42 DFILES = $(MEMBERS:.m=.d)
43
44 TARGET = all
45
46 .PHONY: default all clean realclean install depend
47 .SUFFIXES: .d .h .c .o
48 .DEFAULT: $(TARGET)
49 .SILENT: $(DFILES) clean  # hides output
50
51 $(TARGET):      $(DFILES) $(OFILES)
52
53 %.d:    %.c
54         $(SHELL) -ec '$(CXX) $(DEPENDFLAGS) $(INCLUDES) $(X_INCLUDES) $< | sed '\''s/\($*\)\.o[ :]*/\.\.\/objects\/\1.o $@ : /g'\'' > $@'
55
56
57 ../objects/%.o:    %.c
58         $(CXX) $(CFLAGS) $(CXXFLAGS) $(COPTFLAGS) $(INCLUDES) $(X_INCLUDES) -c $< -o $@
59
60 lib:
61         cp $(DISTRIB) ../../include
62
63 clean:
64         rm -f $(OFILES) $(DFILES)
65
66 realclean:      clean
67         rm -f $(TARGET) *.flc TAGS \#*
68         rm -rf auto/
69
70 -include $(DFILES)