sly1/build/ee-bin.mk

22 lines
503 B
Makefile

include build/ee-common.mk
OBJS := $(OBJDIR)/crt0.o $(OBJS)
OUTDIR := bin/$(CONFIG)
# This incantation is done to avoid modifying the SCE linker scripts.
$(OUTDIR)/$(NAME): $(OBJDIR)/ $(OUTDIR)/ $(OBJS)
cd $(OBJDIR)/ && $(CXX) $(CXXFLAGS) -o ../../$@ $(OBJS:$(OBJDIR)/%=%) $(LDFLAGS)
# :( have to duplicate the rule
$(OBJDIR)/crt0.o: $(CRT0_S)
$(CC) -c -xassembler-with-cpp $(CCFLAGS) $< -o $@
$(OBJDIR)/:
mkdir -p $@
$(OUTDIR)/:
mkdir -p $@
clean-products:
$(RM) $(OBJS) $(OUTDIR)/*/$(NAME)