3 --- Makefile.orig 2009-05-15 15:14:07 +0300
4 +++ Makefile 2009-08-08 15:00:51 +0300
5 @@ -8,18 +8,18 @@ BUILDDIR ?= build
6 FIRM_CFLAGS ?= `pkg-config --cflags libfirm`
7 FIRM_LIBS ?= `pkg-config --libs libfirm`
9 -CPPFLAGS = -DHAVE_CONFIG_H -DFIRM_BACKEND
10 +CPPFLAGS += -DHAVE_CONFIG_H -DFIRM_BACKEND
12 CPPFLAGS += $(FIRM_CFLAGS)
14 CFLAGS += -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Werror -std=c99 -pedantic
16 +CFLAGS += ${COPTS} ${DBG}
17 #CFLAGS += -O3 -march=pentium4 -fomit-frame-pointer -DNDEBUG
18 #CFLAGS += -pg -O3 -fno-inline
19 -ICC_CFLAGS = -O0 -g3 -std=c99 -Wall -Werror
20 +#ICC_CFLAGS = -O0 -g3 -std=c99 -Wall -Werror
27 LFLAGS += $(FIRM_LIBS)
29 @@ -57,13 +57,13 @@ SOURCES := \
30 wrappergen/write_fluffy.c \
31 wrappergen/write_jna.c
33 -OBJECTS = $(SOURCES:%.c=build/%.o)
34 +OBJECTS = $(SOURCES:%.c=build/%.lo)
36 SPLINTS = $(addsuffix .splint, $(SOURCES))
37 CPARSERS = $(addsuffix .cparser, $(SOURCES))
38 -CPARSEROS = $(SOURCES:%.c=build/cpb/%.o)
39 -CPARSEROS_E = $(SOURCES:%.c=build/cpbe/%.o)
40 -CPARSEROS2 = $(SOURCES:%.c=build/cpb2/%.o)
41 +CPARSEROS = $(SOURCES:%.c=build/cpb/%.lo)
42 +CPARSEROS_E = $(SOURCES:%.c=build/cpbe/%.lo)
43 +CPARSEROS2 = $(SOURCES:%.c=build/cpb2/%.lo)
47 @@ -99,7 +99,8 @@ UNUSED := $(shell mkdir -p $(DIRS))
49 $(GOAL): $(OBJECTS) $(LIBFIRM_FILE)
51 - $(Q)$(CC) $(OBJECTS) $(LFLAGS) -o $(GOAL)
52 + $(Q)$(LIBTOOL) --mode=link --tag=CC \
53 + $(CC) $(OBJECTS) $(LFLAGS) -o $(GOAL)
57 @@ -129,35 +130,42 @@ builtins.h: builtins/builtins.c create_b
61 -build/cpb/%.o: %.c build/cparser
62 +build/cpb/%.lo: %.c build/cparser
63 @echo '===> CPARSER $<'
64 - $(Q)./build/cparser $(CPPFLAGS) -std=c99 -Wall -g3 -c $< -o $@
65 + $(Q)$(LIBTOOL) --mode=compile --tag=CC \
66 + ./build/cparser $(CPPFLAGS) -std=c99 -Wall -g3 -c $< -o $@
71 - $(Q)eccp $(CPPFLAGS) -std=c99 -Wall -c $< -o $@
72 + $(Q)$(LIBTOOL) --mode=compile --tag=CC \
73 + eccp $(CPPFLAGS) -std=c99 -Wall -c $< -o $@
75 -build/cpb2/%.o: %.c cparser.bootstrap
76 +build/cpb2/%.lo: %.c cparser.bootstrap
77 @echo '===> CPARSER.BOOTSTRAP $<'
78 - $(Q)./cparser.bootstrap $(CPPFLAGS) -Wall -g -c $< -o $@
79 + $(Q)$(LIBTOOL) --mode=compile --tag=CC \
80 + ./cparser.bootstrap $(CPPFLAGS) -Wall -g -c $< -o $@
82 cparser.bootstrap: $(CPARSEROS)
84 - $(Q)./build/cparser $(CPARSEROS) $(LFLAGS) -o $@
85 + $(Q)$(LIBTOOL) --mode=link \
86 + ./build/cparser $(CPARSEROS) $(LFLAGS) -o $@
88 cparser.bootstrape: $(CPARSEROS_E)
90 - $(Q)gcc $(CPARSEROS_E) $(LFLAGS) -o $@
91 + $(Q)$(LIBTOOL) --mode=link \
92 + gcc $(CPARSEROS_E) $(LFLAGS) -o $@
94 cparser.bootstrap2: $(CPARSEROS2)
96 - $(Q)./cparser.bootstrap $(CPARSEROS2) $(LFLAGS) -o $@
97 + $(Q)$(LIBTOOL) --mode=link \
98 + ./cparser.bootstrap $(CPARSEROS2) $(LFLAGS) -o $@
103 #$(Q)$(ICC) $(CPPFLAGS) $(ICC_CFLAGS) -c $< -o $@
104 #$(Q)$(GCCO1) $(CPPFLAGS) $(CFLAGS) -O1 -c $< -o $@
105 - $(Q)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
106 + $(Q)$(LIBTOOL) --mode=compile --tag=CC \
107 + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@