Fix mkdir on msys (apparently)
I don't have an environment to test, let's just hope this works :S
This commit is contained in:
9
Makefile
9
Makefile
@@ -18,6 +18,7 @@ ROMFILE = $(BINDIR)/$(ROMName).$(ROMExt)
|
|||||||
RGBASM = rgbasm
|
RGBASM = rgbasm
|
||||||
RGBLINK = rgblink
|
RGBLINK = rgblink
|
||||||
RGBFIX = rgbfix
|
RGBFIX = rgbfix
|
||||||
|
MKDIR = $(shell which mkdir)
|
||||||
|
|
||||||
# Argument constants
|
# Argument constants
|
||||||
ASFLAGS += -E -h -i $(SRCDIR)/ -i $(SRCDIR)/constants/ -i $(SRCDIR)/macros/ -p $(FillValue)
|
ASFLAGS += -E -h -i $(SRCDIR)/ -i $(SRCDIR)/constants/ -i $(SRCDIR)/macros/ -p $(FillValue)
|
||||||
@@ -65,8 +66,8 @@ dummy: $(INITTARGETS)
|
|||||||
# > This would cause the first compilation to never finish, thus Make never knows to build the binary files, thus deadlocking everything.
|
# > This would cause the first compilation to never finish, thus Make never knows to build the binary files, thus deadlocking everything.
|
||||||
$(DEPSDIR)/%.d: $(SRCDIR)/%.asm dummy
|
$(DEPSDIR)/%.d: $(SRCDIR)/%.asm dummy
|
||||||
@echo Building deps file $@
|
@echo Building deps file $@
|
||||||
@mkdir -p $(DEPSDIR)
|
@$(MKDIR) -p $(DEPSDIR)
|
||||||
@mkdir -p $(OBJDIR)
|
@$(MKDIR) -p $(OBJDIR)
|
||||||
set -e; \
|
set -e; \
|
||||||
$(RGBASM) -M $@.tmp $(ASFLAGS) -o $(patsubst $(SRCDIR)/%.asm,$(OBJDIR)/%.o,$<) $<; \
|
$(RGBASM) -M $@.tmp $(ASFLAGS) -o $(patsubst $(SRCDIR)/%.asm,$(OBJDIR)/%.o,$<) $<; \
|
||||||
sed 's,\($*\)\.o[ :]*,\1.o $@: ,g' < $@.tmp > $@; \
|
sed 's,\($*\)\.o[ :]*,\1.o $@: ,g' < $@.tmp > $@; \
|
||||||
@@ -78,7 +79,7 @@ include $(patsubst $(SRCDIR)/%.asm,$(DEPSDIR)/%.d,$(ASMFILES))
|
|||||||
|
|
||||||
# How to make the ROM
|
# How to make the ROM
|
||||||
$(ROMFILE): $(patsubst $(SRCDIR)/%.asm,$(OBJDIR)/%.o,$(ASMFILES))
|
$(ROMFILE): $(patsubst $(SRCDIR)/%.asm,$(OBJDIR)/%.o,$(ASMFILES))
|
||||||
@mkdir -p $(BINDIR)
|
@$(MKDIR) -p $(BINDIR)
|
||||||
|
|
||||||
$(RGBASM) $(ASFLAGS) -o $(OBJDIR)/build_date.o $(SRCDIR)/res/build_date.asm
|
$(RGBASM) $(ASFLAGS) -o $(OBJDIR)/build_date.o $(SRCDIR)/res/build_date.asm
|
||||||
|
|
||||||
@@ -90,6 +91,6 @@ $(ROMFILE): $(patsubst $(SRCDIR)/%.asm,$(OBJDIR)/%.o,$(ASMFILES))
|
|||||||
# How to make the objects files
|
# How to make the objects files
|
||||||
# (Just in case; since generating the deps files also generates the OBJ files, this should not be run ever, unless the OBJ files are destroyed but the deps files aren't.)
|
# (Just in case; since generating the deps files also generates the OBJ files, this should not be run ever, unless the OBJ files are destroyed but the deps files aren't.)
|
||||||
$(OBJDIR)/%.o: $(SRCDIR)/%.asm
|
$(OBJDIR)/%.o: $(SRCDIR)/%.asm
|
||||||
@mkdir -p $(OBJDIR)
|
@$(MKDIR) -p $(OBJDIR)
|
||||||
$(RGBASM) $(ASFLAGS) -o $@ $<
|
$(RGBASM) $(ASFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user