rickjr: makefile changes "make overlay" command has been added and works, but this is definitely messy right now
This commit is contained in:
parent
5d67b21baa
commit
07fe60536a
2 changed files with 29 additions and 25 deletions
47
Makefile
47
Makefile
|
@ -41,7 +41,6 @@ INCCMD += -I$(F256)/f256lib
|
|||
|
||||
OBJDIR = $(PROJROOT)/obj
|
||||
DEPDIR = $(PROJROOT)/dep
|
||||
LSTDIR = $(PROJROOT)/lst
|
||||
|
||||
#
|
||||
# Special GnuMake Search Path Directive
|
||||
|
@ -96,9 +95,11 @@ OBJS += syssnd.o
|
|||
OBJS += system.o
|
||||
OBJS += sysvid.o
|
||||
OBJS += util.o
|
||||
OBJS += f256.o
|
||||
#OBJS += f256.o
|
||||
OBJS += dat_spritesJR.o
|
||||
|
||||
LIBS := $(OBJDIR)/f256.o
|
||||
|
||||
# Data Objects
|
||||
#OBJS += splash.o
|
||||
|
||||
|
@ -126,24 +127,22 @@ LDFLAGS = -Trickjr.ld --verbose
|
|||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(DEPS) $(OBJS) $(LIBS)
|
||||
${CC} $(CFLAGS) $(TMPFLAGS) $(INCCMD) -c ${F256}/f256lib/f256.c -o $(OBJDIR)/f256.o > $(LSTDIR)/$*.lst
|
||||
#$(TARGET): $(DEPS) $(OBJS) $(LIBS)
|
||||
$(TARGET): $(DEPS) $(OBJS) overlay
|
||||
${CC} $(CFLAGS) $(TMPFLAGS) $(INCCMD) -c ${F256}/f256lib/f256.c -o $(OBJDIR)/f256.o
|
||||
$(LD) -o $@ $(addprefix $(OBJDIR)/,$(OBJS)) $(LIBS) $(LDFLAGS)
|
||||
llvm-objdump --syms -d --print-imm-hex $(TARGET).elf > $(TARGET).lst
|
||||
|
||||
# Object Rules
|
||||
|
||||
.s.o:
|
||||
$(AS) $(ASFLAGS) $(TMPFLAGS) $(INCCMD) -o $(OBJDIR)/$@ $< > $(LSTDIR)/$*.lst
|
||||
$(AS) $(ASFLAGS) $(TMPFLAGS) $(INCCMD) -o $(OBJDIR)/$@ $<
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(TMPFLAGS) $(INCCMD) -c $< -o $(OBJDIR)/$*.o > $(LSTDIR)/$*.lst
|
||||
$(CC) $(CFLAGS) $(TMPFLAGS) $(INCCMD) -c $< -o $(OBJDIR)/$*.o
|
||||
|
||||
.cc.o:
|
||||
$(CC) $(CXXFLAGS) $(TMPFLAGS) $(INCCMD) -c $< -o $(OBJDIR)/$*.o > $(LSTDIR)/$*.lst
|
||||
|
||||
#.256.o:
|
||||
# $(LD) -r -o $(OBJDIR)/$*.o -z noexecstack --format=binary $<
|
||||
$(CC) $(CXXFLAGS) $(TMPFLAGS) $(INCCMD) -c $< -o $(OBJDIR)/$*.o
|
||||
|
||||
|
||||
# Dependencie Rules
|
||||
|
@ -153,9 +152,6 @@ $(TARGET): $(DEPS) $(OBJS) $(LIBS)
|
|||
.s.d:
|
||||
touch $(DEPDIR)/$*.d
|
||||
|
||||
#.256.d:
|
||||
# touch $(DEPDIR)/$*.d
|
||||
|
||||
.c.d:
|
||||
set -e; $(CC) -M $(CFLAGS) $(TMPFLAGS) $(INCCMD) $< \
|
||||
| sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $(DEPDIR)/$@; \
|
||||
|
@ -172,7 +168,20 @@ $(TARGET): $(DEPS) $(OBJS) $(LIBS)
|
|||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) $(OBJDIR) *.o $(DEPDIR) *.map $(LSTDIR) $(TARGET) $(TARGET).elf $(TARGET).pgz $(TARGET).lst
|
||||
$(RM) $(OBJDIR) *.o $(DEPDIR) *.map $(TARGET) $(TARGET).elf $(TARGET).pgz $(TARGET).lst
|
||||
|
||||
# needed for the overlay input
|
||||
HELPER = $(HOME)/code/rickjr/bin/oh
|
||||
CFILES = $(patsubst %.o,src/%.c,$(OBJS))
|
||||
|
||||
|
||||
.PHONY: overlay
|
||||
|
||||
overlay_reset:
|
||||
@echo '/* Overlay Helper Generated Linker Script */' > overlay.ld
|
||||
|
||||
overlay: overlay_reset $(CFILES)
|
||||
$(foreach cfile,$(CFILES),$(shell $(HELPER) $(cfile) >> $(HOME)/code/rickjr/overlay.ld))
|
||||
|
||||
|
||||
########################################
|
||||
|
@ -191,7 +200,7 @@ $(DEPS) : Makefile
|
|||
# Targets that create the output object directory if it doesn't already exist
|
||||
#
|
||||
|
||||
Makefile : $(OBJDIR) $(DEPDIR) $(LSTDIR)
|
||||
Makefile : $(OBJDIR) $(DEPDIR)
|
||||
|
||||
$(OBJDIR) :
|
||||
$(MKDIR) $(OBJDIR)
|
||||
|
@ -203,16 +212,8 @@ $(OBJDIR) :
|
|||
$(DEPDIR) :
|
||||
$(MKDIR) $(DEPDIR)
|
||||
|
||||
#
|
||||
# Targets that create the output list directory if it doesn't already exist
|
||||
#
|
||||
|
||||
$(LSTDIR) :
|
||||
$(MKDIR) $(LSTDIR)
|
||||
|
||||
#
|
||||
# Generated Dependencie Files
|
||||
#
|
||||
-include $(wildcard $(DEPDIR)/*.d)
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ extern char incbin_sprites_256_start_high[];
|
|||
extern char incbin_tiles_256_start[];
|
||||
extern char incbin_splash_256_start[];
|
||||
extern char __block23_lma_high[];
|
||||
extern char scr_credit_BLOCK[];
|
||||
//extern char scr_credit_BLOCK[];
|
||||
extern const char scr_credit_BLOCK;
|
||||
|
||||
CODE_BLOCK(8) void scr_credit()
|
||||
{
|
||||
|
@ -27,7 +28,9 @@ CODE_BLOCK(8) void scr_credit()
|
|||
*((char*)0x200) = (char)(((long)(&incbin_sprites_256_start)));
|
||||
*((char*)0x201) = (char)(((long)(&incbin_sprites_256_start))>>8);
|
||||
*((char*)0x202) = (char)(((long)(&incbin_sprites_256_start_high)));
|
||||
*((char*)0x203) = (char)(((long)(&scr_credit_BLOCK)));
|
||||
// *((char*)0x203) = (char)(((long)(&scr_credit_BLOCK)));
|
||||
*((char*)0x203) = scr_credit_BLOCK;
|
||||
|
||||
// *((char*)0x203) = (char)(((long)(__block23_lma_high))>>8);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue