mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Roll back all these changes that have broken Makefile.target again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5818a7162d
commit
1f64ad998a
@ -41,7 +41,7 @@ ASFLAGS = -c $(CFLAGS)
|
|||||||
##
|
##
|
||||||
ifdef PROG
|
ifdef PROG
|
||||||
|
|
||||||
default: $(PROG).clean.bc $(PROG).native $(PROG)
|
default: $(PROG) $(PROG).native
|
||||||
|
|
||||||
ifeq ($(strip $(OBJS)),)
|
ifeq ($(strip $(OBJS)),)
|
||||||
BCOBJS = $(PROG).bc
|
BCOBJS = $(PROG).bc
|
||||||
@ -52,15 +52,8 @@ ifdef PROG
|
|||||||
$(PROG).linked.bc: $(BCOBJS)
|
$(PROG).linked.bc: $(BCOBJS)
|
||||||
$(LLINK) -f $(BCOBJS) -o $@
|
$(LLINK) -f $(BCOBJS) -o $@
|
||||||
|
|
||||||
$(PROG).clean.bc: $(PROG).linked.bc
|
|
||||||
$(LOPT) -cleangcc -raise -constprop -dce -o $@ -f $<
|
|
||||||
|
|
||||||
$(PROG).native: $(OBJS:.o=.c)
|
$(PROG).native: $(OBJS:.o=.c)
|
||||||
gcc $(OBJS:.o=.c) -O2 $(LOCAL_CFLAGS) $(LOCAL_LIBS) -Wall -o $@
|
gcc $(OBJS:.o=.c) -O2 $(LOCAL_CFLAGS) -Wall -o $@
|
||||||
|
|
||||||
clean::
|
|
||||||
rm -f $(PROG).native $(PROG)
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
## Special target to force target-dependent library to be compiled
|
## Special target to force target-dependent library to be compiled
|
||||||
@ -72,8 +65,8 @@ $(LLCLIB):
|
|||||||
runtime.o: runtime.c
|
runtime.o: runtime.c
|
||||||
$(CC) -c $(CCFLAGS) $<
|
$(CC) -c $(CCFLAGS) $<
|
||||||
|
|
||||||
clean ::
|
clean :
|
||||||
$(RM) *.[123] *.bc *.mc *.s *.o a.out core *~
|
$(RM) *.[123] *.bc *.mc *.s *.o a.out core $(PROG)
|
||||||
|
|
||||||
%.mc: %.bc $(LLC) $(AS)
|
%.mc: %.bc $(LLC) $(AS)
|
||||||
@echo "Generating machine instructions for $<"
|
@echo "Generating machine instructions for $<"
|
||||||
@ -87,7 +80,9 @@ clean ::
|
|||||||
## $(LCC) $(LCFLAGS) -S $< -o $*.ll
|
## $(LCC) $(LCFLAGS) -S $< -o $*.ll
|
||||||
|
|
||||||
%.bc: %.c
|
%.bc: %.c
|
||||||
$(LCC) $(LCFLAGS) -c $< -o $@
|
$(LCC) $(LCFLAGS) -c $< -o $*.tmp.bc
|
||||||
|
$(LOPT) -cleangcc -raise -constprop -dce $*.tmp.bc -o $@
|
||||||
|
$(RM) $*.tmp.bc
|
||||||
|
|
||||||
%.bc: %.ll
|
%.bc: %.ll
|
||||||
$(LAS) -f $<
|
$(LAS) -f $<
|
||||||
@ -95,7 +90,7 @@ clean ::
|
|||||||
%.linked.bc: %.bc
|
%.linked.bc: %.bc
|
||||||
$(CP) $< $@
|
$(CP) $< $@
|
||||||
|
|
||||||
%.s: %.clean.bc
|
%.s: %.linked.bc
|
||||||
$(LLC) -f $(LLCFLAGS) $< -o $@
|
$(LLC) -f $(LLCFLAGS) $< -o $@
|
||||||
|
|
||||||
%: %.o $(LIBS)
|
%: %.o $(LIBS)
|
||||||
|
@ -41,7 +41,7 @@ ASFLAGS = -c $(CFLAGS)
|
|||||||
##
|
##
|
||||||
ifdef PROG
|
ifdef PROG
|
||||||
|
|
||||||
default: $(PROG).clean.bc $(PROG).native $(PROG)
|
default: $(PROG) $(PROG).native
|
||||||
|
|
||||||
ifeq ($(strip $(OBJS)),)
|
ifeq ($(strip $(OBJS)),)
|
||||||
BCOBJS = $(PROG).bc
|
BCOBJS = $(PROG).bc
|
||||||
@ -52,15 +52,8 @@ ifdef PROG
|
|||||||
$(PROG).linked.bc: $(BCOBJS)
|
$(PROG).linked.bc: $(BCOBJS)
|
||||||
$(LLINK) -f $(BCOBJS) -o $@
|
$(LLINK) -f $(BCOBJS) -o $@
|
||||||
|
|
||||||
$(PROG).clean.bc: $(PROG).linked.bc
|
|
||||||
$(LOPT) -cleangcc -raise -constprop -dce -o $@ -f $<
|
|
||||||
|
|
||||||
$(PROG).native: $(OBJS:.o=.c)
|
$(PROG).native: $(OBJS:.o=.c)
|
||||||
gcc $(OBJS:.o=.c) -O2 $(LOCAL_CFLAGS) $(LOCAL_LIBS) -Wall -o $@
|
gcc $(OBJS:.o=.c) -O2 $(LOCAL_CFLAGS) -Wall -o $@
|
||||||
|
|
||||||
clean::
|
|
||||||
rm -f $(PROG).native $(PROG)
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
## Special target to force target-dependent library to be compiled
|
## Special target to force target-dependent library to be compiled
|
||||||
@ -72,8 +65,8 @@ $(LLCLIB):
|
|||||||
runtime.o: runtime.c
|
runtime.o: runtime.c
|
||||||
$(CC) -c $(CCFLAGS) $<
|
$(CC) -c $(CCFLAGS) $<
|
||||||
|
|
||||||
clean ::
|
clean :
|
||||||
$(RM) *.[123] *.bc *.mc *.s *.o a.out core *~
|
$(RM) *.[123] *.bc *.mc *.s *.o a.out core $(PROG)
|
||||||
|
|
||||||
%.mc: %.bc $(LLC) $(AS)
|
%.mc: %.bc $(LLC) $(AS)
|
||||||
@echo "Generating machine instructions for $<"
|
@echo "Generating machine instructions for $<"
|
||||||
@ -87,7 +80,9 @@ clean ::
|
|||||||
## $(LCC) $(LCFLAGS) -S $< -o $*.ll
|
## $(LCC) $(LCFLAGS) -S $< -o $*.ll
|
||||||
|
|
||||||
%.bc: %.c
|
%.bc: %.c
|
||||||
$(LCC) $(LCFLAGS) -c $< -o $@
|
$(LCC) $(LCFLAGS) -c $< -o $*.tmp.bc
|
||||||
|
$(LOPT) -cleangcc -raise -constprop -dce $*.tmp.bc -o $@
|
||||||
|
$(RM) $*.tmp.bc
|
||||||
|
|
||||||
%.bc: %.ll
|
%.bc: %.ll
|
||||||
$(LAS) -f $<
|
$(LAS) -f $<
|
||||||
@ -95,7 +90,7 @@ clean ::
|
|||||||
%.linked.bc: %.bc
|
%.linked.bc: %.bc
|
||||||
$(CP) $< $@
|
$(CP) $< $@
|
||||||
|
|
||||||
%.s: %.clean.bc
|
%.s: %.linked.bc
|
||||||
$(LLC) -f $(LLCFLAGS) $< -o $@
|
$(LLC) -f $(LLCFLAGS) $< -o $@
|
||||||
|
|
||||||
%: %.o $(LIBS)
|
%: %.o $(LIBS)
|
||||||
|
Loading…
Reference in New Issue
Block a user