diff options
-rw-r--r-- | test/Makefile.target | 15 | ||||
-rw-r--r-- | test/Makefile.tests | 15 |
2 files changed, 18 insertions, 12 deletions
diff --git a/test/Makefile.target b/test/Makefile.target index 7e54ccc555..13c508f045 100644 --- a/test/Makefile.target +++ b/test/Makefile.target @@ -8,11 +8,15 @@ ## Special targets to build a program from multiple source files ## ifdef PROG - default: $(PROG) - .SECONDARY: $(PROG).clean.bc ## keep %.clean.bc from being deleted - $(PROG).bc: $(OBJS) - $(LLINK) -f $(OBJS) -o $@ +default: $(PROG).clean.bc $(PROG).native + #.SECONDARY: $(PROG).clean.bc ## keep %.clean.bc from being deleted + +$(PROG).bc: $(OBJS) + $(LLINK) -f $(OBJS) -o $@ $(CFLAGS) + +$(PROG).native: $(OBJS:.o=.c) + gcc -o $@ $(OBJS:.o=.c) -O2 $(LOCAL_CFLAGS) -Wall endif TOOLS = $(LEVEL)/tools/Debug @@ -63,8 +67,7 @@ clean : $(LLC) -f -trace $(LLCFLAGS) $< %.o: %.c - $(LCC) $(LCFLAGS) -S -o $*.ll $< - $(LAS) -o $@ $*.ll + $(LCC) $(LCFLAGS) -c -o $@ $< %.bc: %.ll $(LAS) -f $< diff --git a/test/Makefile.tests b/test/Makefile.tests index 7e54ccc555..13c508f045 100644 --- a/test/Makefile.tests +++ b/test/Makefile.tests @@ -8,11 +8,15 @@ ## Special targets to build a program from multiple source files ## ifdef PROG - default: $(PROG) - .SECONDARY: $(PROG).clean.bc ## keep %.clean.bc from being deleted - $(PROG).bc: $(OBJS) - $(LLINK) -f $(OBJS) -o $@ +default: $(PROG).clean.bc $(PROG).native + #.SECONDARY: $(PROG).clean.bc ## keep %.clean.bc from being deleted + +$(PROG).bc: $(OBJS) + $(LLINK) -f $(OBJS) -o $@ $(CFLAGS) + +$(PROG).native: $(OBJS:.o=.c) + gcc -o $@ $(OBJS:.o=.c) -O2 $(LOCAL_CFLAGS) -Wall endif TOOLS = $(LEVEL)/tools/Debug @@ -63,8 +67,7 @@ clean : $(LLC) -f -trace $(LLCFLAGS) $< %.o: %.c - $(LCC) $(LCFLAGS) -S -o $*.ll $< - $(LAS) -o $@ $*.ll + $(LCC) $(LCFLAGS) -c -o $@ $< %.bc: %.ll $(LAS) -f $< |