Skip to content

Commit

Permalink
when in cbhc/haxchi cfw it will now protect against installing over t…
Browse files Browse the repository at this point in the history
…he used ds vc title
  • Loading branch information
FIX94 committed Dec 28, 2016
1 parent f4ac8e7 commit df41c59
Show file tree
Hide file tree
Showing 15 changed files with 233 additions and 63 deletions.
2 changes: 1 addition & 1 deletion dsrom/cbhc_menu/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static unsigned int getButtonsDown(unsigned int padscore_handle, unsigned int vp
#define SD_HBL_PATH "/vol/external01/wiiu/apps/homebrew_launcher/homebrew_launcher.elf"
#define SD_MOCHA_PATH "/vol/external01/wiiu/apps/mocha/mocha.elf"

static const char *verChar = "CBHC v1.4u2 by FIX94";
static const char *verChar = "CBHC v1.5 by FIX94";

#define DEFAULT_DISABLED 0
#define DEFAULT_SYSMENU 1
Expand Down
9 changes: 8 additions & 1 deletion dsrom/iosu_patcher/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ FIRMWARE = 550

all: clean setup main

$(CURDIR)/payload/arm_kernel_bin.h: $(CURDIR)/payload/titleprot_bin.h $(CURDIR)/payload/wupserver_bin.h $(CURDIR)/payload/arm_user_bin.h
$(CURDIR)/payload/arm_kernel_bin.h: $(CURDIR)/payload/titleprot2_bin.h $(CURDIR)/payload/titleprot_bin.h \
$(CURDIR)/payload/wupserver_bin.h $(CURDIR)/payload/arm_user_bin.h
@$(MAKE) --no-print-directory -C $(CURDIR)/arm_kernel -f $(CURDIR)/arm_kernel/Makefile
@-mkdir -p $(CURDIR)/payload
@cp -p $(CURDIR)/arm_kernel/arm_kernel_bin.h $@

$(CURDIR)/payload/titleprot2_bin.h:
@$(MAKE) --no-print-directory -C $(CURDIR)/titleprot2 -f $(CURDIR)/titleprot2/Makefile
@-mkdir -p $(CURDIR)/payload
@cp -p $(CURDIR)/titleprot2/titleprot2_bin.h $@

$(CURDIR)/payload/titleprot_bin.h:
@$(MAKE) --no-print-directory -C $(CURDIR)/titleprot -f $(CURDIR)/titleprot/Makefile
@-mkdir -p $(CURDIR)/payload
Expand Down Expand Up @@ -52,5 +58,6 @@ clean:
rm -rf iosu_patcher.elf iosu_patcher.map
$(MAKE) --no-print-directory -C $(CURDIR)/arm_user -f $(CURDIR)/arm_user/Makefile clean
$(MAKE) --no-print-directory -C $(CURDIR)/titleprot -f $(CURDIR)/titleprot/Makefile clean
$(MAKE) --no-print-directory -C $(CURDIR)/titleprot2 -f $(CURDIR)/titleprot2/Makefile clean
$(MAKE) --no-print-directory -C $(CURDIR)/../../wupserver -f $(CURDIR)/../../wupserver/Makefile clean
$(MAKE) --no-print-directory -C $(CURDIR)/arm_kernel -f $(CURDIR)/arm_kernel/Makefile clean
11 changes: 11 additions & 0 deletions dsrom/iosu_patcher/arm_kernel/source/getbins.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "../../payload/titleprot_bin.h"
#include "../../payload/titleprot2_bin.h"
#include "../../payload/wupserver_bin.h"

//not really a bin but still a const val
Expand All @@ -14,6 +15,16 @@ unsigned int get_titleprot_bin_len()
return titleprot_bin_len;
}

const unsigned char *get_titleprot2_bin()
{
return titleprot2_bin;
}

unsigned int get_titleprot2_bin_len()
{
return titleprot2_bin_len;
}

const unsigned char *get_wupserver_bin()
{
return wupserver_bin;
Expand Down
9 changes: 5 additions & 4 deletions dsrom/iosu_patcher/arm_kernel/source/getbins.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
#ifndef _GETBINS_H_
#define _GETBINS_H_

#define titleprot_addr 0x0510D984
#define titleprot_addr 0x0510D988
#define titleprot2_addr 0x0510D9AC
#define wupserver_addr 0x0510E570

#define titleprot_phys (titleprot_addr - 0x05100000 + 0x13D80000)
#define wupserver_phys (wupserver_addr - 0x05100000 + 0x13D80000)

const unsigned char *get_titleprot_bin();
unsigned int get_titleprot_bin_len();

const unsigned char *get_titleprot2_bin();
unsigned int get_titleprot2_bin_len();

const unsigned char *get_wupserver_bin();
unsigned int get_wupserver_bin_len();

Expand Down
104 changes: 59 additions & 45 deletions dsrom/iosu_patcher/arm_kernel/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ int _main()

unsigned int control_register = disable_mmu();

/* copy in ds vc title id to protect from moving/deleting */
/* copy in ds vc title id to protect from installing/moving/deleting */
kernel_memcpy((void*)(get_titleprot2_bin()+get_titleprot2_bin_len()-12), (void*)0x01E70108, 4);
kernel_memcpy((void*)(get_titleprot_bin()+get_titleprot_bin_len()-8), (void*)0x01E70108, 4);

/* save if we are booted from CBHC */
Expand All @@ -74,7 +75,7 @@ int _main()
*(volatile u32*)0x01E10000 = *(volatile u32*)0x1016AD18;

/* Patch kernel_error_handler to BX LR immediately */
*(volatile u32*)0x08129A24 = 0xE12FFF1E;
*(volatile u32*)kernel_phys(0x08129A24) = 0xE12FFF1E;

void * pset_fault_behavior = (void*)0x081298BC;
kernel_memcpy(pset_fault_behavior, (void*)repairData_set_fault_behavior, sizeof(repairData_set_fault_behavior));
Expand All @@ -92,103 +93,116 @@ int _main()
if(launchmode != LAUNCH_MOCHA)
{
// nop out memcmp hash checks
*(volatile u32*)(0x040017E0 - 0x04000000 + 0x08280000) = 0xE3A00000; // mov r0, #0
*(volatile u32*)(0x040019C4 - 0x04000000 + 0x08280000) = 0xE3A00000; // mov r0, #0
*(volatile u32*)(0x04001BB0 - 0x04000000 + 0x08280000) = 0xE3A00000; // mov r0, #0
*(volatile u32*)(0x04001D40 - 0x04000000 + 0x08280000) = 0xE3A00000; // mov r0, #0
*(volatile u32*)crypto_phys(0x040017E0) = 0xE3A00000; // mov r0, #0
*(volatile u32*)crypto_phys(0x040019C4) = 0xE3A00000; // mov r0, #0
*(volatile u32*)crypto_phys(0x04001BB0) = 0xE3A00000; // mov r0, #0
*(volatile u32*)crypto_phys(0x04001D40) = 0xE3A00000; // mov r0, #0

// patch OS launch sig check
*(volatile u32*)(0x0500A818 - 0x05000000 + 0x081C0000) = 0x20002000; // mov r0, #0; mov r0, #0
*(volatile u32*)mcp_phys(0x0500A818) = 0x20002000; // mov r0, #0; mov r0, #0

// fix 10 minute timeout that crashes MCP after 10 minutes of booting
*(volatile u32*)mcp_phys(0x05022474) = 0xFFFFFFFF; // NEW_TIMEOUT
}

if(launchmode != LAUNCH_MOCHA && launchmode != LAUNCH_CFW_IMG)
{
// patch MCP authentication check
*(volatile u32*)(0x05014CAC - 0x05000000 + 0x081C0000) = 0x20004770; // mov r0, #0; bx lr
// jump to titleprot2_addr
*(volatile u32*)mcp_phys(0x05014670) = 0xF0F9F99C; //bl titleprot2_addr

// fix 10 minute timeout that crashes MCP after 10 minutes of booting
*(volatile u32*)(0x05022474 - 0x05000000 + 0x081C0000) = 0xFFFFFFFF; // NEW_TIMEOUT
// patch MCP authentication check
*(volatile u32*)mcp_phys(0x05014CAC) = 0x20004770; // mov r0, #0; bx lr

// replace ioctl 0x62 code with jump to wupserver
*(volatile u32*)(0x05026BA8 - 0x05000000 + 0x081C0000) = 0x47780000; // bx pc
*(volatile u32*)(0x05026BAC - 0x05000000 + 0x081C0000) = 0xE59F1000; // ldr r1, [pc]
*(volatile u32*)(0x05026BB0 - 0x05000000 + 0x081C0000) = 0xE12FFF11; // bx r1
*(volatile u32*)(0x05026BB4 - 0x05000000 + 0x081C0000) = wupserver_addr; // wupserver code
*(volatile u32*)mcp_phys(0x05026BA8) = 0x47780000; // bx pc
*(volatile u32*)mcp_phys(0x05026BAC) = 0xE59F1000; // ldr r1, [pc]
*(volatile u32*)mcp_phys(0x05026BB0) = 0xE12FFF11; // bx r1
*(volatile u32*)mcp_phys(0x05026BB4) = wupserver_addr; // wupserver code

// patch cert verification
*(volatile u32*)(0x05052A90 - 0x05000000 + 0x081C0000) = 0xE3A00000; // mov r0, #0
*(volatile u32*)(0x05052A94 - 0x05000000 + 0x081C0000) = 0xE12FFF1E; // bx lr
*(volatile u32*)mcp_phys(0x05052A90) = 0xE3A00000; // mov r0, #0
*(volatile u32*)mcp_phys(0x05052A94) = 0xE12FFF1E; // bx lr

// patch IOSC_VerifyPubkeySign to always succeed
*(volatile u32*)(0x05052C44 - 0x05000000 + 0x081C0000) = 0xE3A00000; // mov r0, #0
*(volatile u32*)(0x05052C48 - 0x05000000 + 0x081C0000) = 0xE12FFF1E; // bx lr
*(volatile u32*)mcp_phys(0x05052C44) = 0xE3A00000; // mov r0, #0
*(volatile u32*)mcp_phys(0x05052C48) = 0xE12FFF1E; // bx lr

// patch cached cert check
*(volatile u32*)(0x05054D6C - 0x05000000 + 0x081C0000) = 0xE3A00000; // mov r0, 0
*(volatile u32*)(0x05054D70 - 0x05000000 + 0x081C0000) = 0xE12FFF1E; // bx lr
*(volatile u32*)mcp_phys(0x05054D6C) = 0xE3A00000; // mov r0, 0
*(volatile u32*)mcp_phys(0x05054D70) = 0xE12FFF1E; // bx lr

// redirect mcp_debug_print to mcp_syslog_print (0x0503DCF0)
*(volatile u32*)(0x05055454 - 0x05000000 + 0x081C0000) = 0xEBFFA225; // bl 0x0503DCF0
*(volatile u32*)mcp_phys(0x05055454) = 0xEBFFA225; // bl 0x0503DCF0

if(from_cbhc) // coldboot specific patches
{
// change system.xml to syshax.xml
*(volatile u32*)(0x050600F0 - 0x05060000 + 0x08220000) = 0x79736861; // ysha
*(volatile u32*)(0x050600F4 - 0x05060000 + 0x08220000) = 0x782E786D; // x.xm
*(volatile u32*)mcp_rodata_phys(0x050600F0) = 0x79736861; // ysha
*(volatile u32*)mcp_rodata_phys(0x050600F4) = 0x782E786D; // x.xm

*(volatile u32*)(0x05060114 - 0x05060000 + 0x08220000) = 0x79736861; // ysha
*(volatile u32*)(0x05060118 - 0x05060000 + 0x08220000) = 0x782E786D; // x.xm
*(volatile u32*)mcp_rodata_phys(0x05060114) = 0x79736861; // ysha
*(volatile u32*)mcp_rodata_phys(0x05060118) = 0x782E786D; // x.xm
}

// jump to titleprot code (titleprot_addr+4)
*(volatile u32*)(0x05107F70 - 0x05100000 + 0x13D80000) = 0xF005FD0A; //bl (titleprot_addr+4)
// jump to titleprot_addr
*(volatile u32*)mcp_d_r_phys(0x05107F70) = 0xF005FD0A; //bl titleprot_addr

//free some mcp_d_r room for our code
*(volatile u32*)mcp_d_r_phys(titleprot_addr-4) = 0x20004770; // mov r0, #0; bx lr
// overwrite mcp_d_r code with titleprot
*(volatile u32*)titleprot_phys = 0x20004770; // mov r0, #0; bx lr
kernel_memcpy((void*)(titleprot_phys+4), get_titleprot_bin(), get_titleprot_bin_len());
invalidate_dcache((u32)(titleprot_phys+4), get_titleprot_bin_len());
kernel_memcpy((void*)mcp_d_r_phys(titleprot_addr), get_titleprot_bin(), get_titleprot_bin_len());
invalidate_dcache(mcp_d_r_phys(titleprot_addr), get_titleprot_bin_len());

// overwrite mcp_d_r code with titleprot2
kernel_memcpy((void*)mcp_d_r_phys(titleprot2_addr), get_titleprot2_bin(), get_titleprot2_bin_len());
invalidate_dcache(mcp_d_r_phys(titleprot2_addr), get_titleprot2_bin_len());
invalidate_icache();

//free some mcp_d_r room for our code
*(volatile u32*)mcp_d_r_phys(wupserver_addr-4) = 0x47700000; //bx lr
// overwrite mcp_d_r code with wupserver
*(volatile u32*)(0x0510E56C - 0x05100000 + 0x13D80000) = 0x47700000; //bx lr
kernel_memcpy((void*)wupserver_phys, get_wupserver_bin(), get_wupserver_bin_len());
invalidate_dcache((u32)wupserver_phys, get_wupserver_bin_len());
kernel_memcpy((void*)mcp_d_r_phys(wupserver_addr), get_wupserver_bin(), get_wupserver_bin_len());
invalidate_dcache(mcp_d_r_phys(wupserver_addr), get_wupserver_bin_len());
invalidate_icache();

// apply IOS ELF launch hook (thanks dimok!)
*(volatile u32*)0x0812A120 = ARM_BL(0x0812A120, kernel_launch_ios);
*(volatile u32*)kernel_phys(0x0812A120) = ARM_BL(0x0812A120, kernel_launch_ios);

// allow any region title launch
*(volatile u32*)(0xE0030498 - 0xE0000000 + 0x12900000) = 0xE3A00000; // mov r0, #0
*(volatile u32*)acp_phys(0xE0030498) = 0xE3A00000; // mov r0, #0

// allow custom bootLogoTex and bootMovie.h264
*(volatile u32*)(0xE0030D68 - 0xE0000000 + 0x12900000) = 0xE3A00000; // mov r0, #0
*(volatile u32*)(0xE0030D34 - 0xE0000000 + 0x12900000) = 0xE3A00000; // mov r0, #0
*(volatile u32*)acp_phys(0xE0030D68) = 0xE3A00000; // mov r0, #0
*(volatile u32*)acp_phys(0xE0030D34) = 0xE3A00000; // mov r0, #0
}

//custom fw.img reboot
if(launchmode == LAUNCH_CFW_IMG)
{
//copy in new fw.img path
int i;
for (i = 0; i < 32; i++)
if (i < 31)
((char*)(0x050663B4 - 0x05000000 + 0x081C0000))[i] = ((char*)0x01E70000)[i];
((char*)mcp_rodata_phys(0x050663B4))[i] = ((char*)0x01E70000)[i];
else
((char*)(0x050663B4 - 0x05000000 + 0x081C0000))[i] = (char)0;
((char*)mcp_rodata_phys(0x050663B4))[i] = (char)0;

*(volatile u32*)(0x050282AE - 0x05000000 + 0x081C0000) = 0xF031FB43; // bl launch_os_hook
// jump to launch_os_hook
*(volatile u32*)mcp_phys(0x050282AE) = 0xF031FB43; // bl launch_os_hook

// copy launch_os_hook into free mcp code space
for (i = 0; i < sizeof(os_launch_hook); i++)
((char*)(0x05059938 - 0x05000000 + 0x081C0000))[i] = os_launch_hook[i];
((char*)mcp_phys(0x05059938))[i] = os_launch_hook[i];
}

if(from_cbhc) // coldboot specific patches
{
// patch default title id to system menu
*(volatile u32*)(0x050B817C - 0x05074000 + 0x08234000) = *(volatile u32*)0x01E70100;
*(volatile u32*)(0x050B8180 - 0x05074000 + 0x08234000) = *(volatile u32*)0x01E70104;
*(volatile u32*)mcp_data_phys(0x050B817C) = *(volatile u32*)0x01E70100;
*(volatile u32*)mcp_data_phys(0x050B8180) = *(volatile u32*)0x01E70104;

// force check USB storage on load
*(volatile u32*)(0xE012202C - 0xE0000000 + 0x12900000) = 0x00000001; // find USB flag
*(volatile u32*)acp_phys(0xE012202C) = 0x00000001; // find USB flag
}

*(volatile u32*)(0x1555500) = 0;
Expand Down
19 changes: 14 additions & 5 deletions dsrom/iosu_patcher/arm_kernel/source/reload.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ void kernel_launch_ios(u32 launch_address, u32 L, u32 C, u32 H)
// patch OS launch sig check
section_write_word(ios_elf_start, 0x0500A818, 0x20002000); // mov r0, #0; mov r0, #0

// jump to titleprot2_addr
section_write_word(ios_elf_start, 0x05014670, 0xF0F9F99C); //bl titleprot2_addr

// patch MCP authentication check
section_write_word(ios_elf_start, 0x05014CAC, 0x20004770); // mov r0, #0; bx lr

Expand Down Expand Up @@ -68,14 +71,20 @@ void kernel_launch_ios(u32 launch_address, u32 L, u32 C, u32 H)
section_write_word(ios_elf_start, 0x05060118, 0x782E786D); // x.xm
}

// jump to titleprot code (titleprot_addr+4)
section_write_word(ios_elf_start, 0x05107F70, 0xF005FD0A); //bl (titleprot_addr+4)
// jump to titleprot_addr
section_write_word(ios_elf_start, 0x05107F70, 0xF005FD0A); //bl titleprot_addr

//free some mcp_d_r room for our code
section_write_word(ios_elf_start, (titleprot_addr-4), 0x20004770); // mov r0, #0; bx lr
// overwrite mcp_d_r code with titleprot
section_write_word(ios_elf_start, titleprot_addr, 0x20004770); // mov r0, #0; bx lr
section_write(ios_elf_start, titleprot_addr+4, get_titleprot_bin(), get_titleprot_bin_len());
section_write(ios_elf_start, titleprot_addr, get_titleprot_bin(), get_titleprot_bin_len());

// overwrite mcp_d_r code with titleprot2
section_write(ios_elf_start, titleprot2_addr, get_titleprot2_bin(), get_titleprot2_bin_len());

//free some mcp_d_r room for our code
section_write_word(ios_elf_start, (wupserver_addr-4), 0x47700000); //bx lr
// overwrite mcp_d_r code with wupserver
section_write_word(ios_elf_start, 0x0510E56C, 0x47700000); // bx lr
section_write(ios_elf_start, wupserver_addr, get_wupserver_bin(), get_wupserver_bin_len());

// apply IOS ELF launch hook (thanks dimok!)
Expand Down
8 changes: 8 additions & 0 deletions dsrom/iosu_patcher/arm_kernel/source/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
#define enable_interrupts ((int(*)(int))0x0812E78C)
#define kernel_bsp_command_5 ((int (*)(const char*, int offset, const char*, int size, void *buffer))0x0812EC40)

#define crypto_phys(addr) ((u32)(addr) - 0x04000000 + 0x08280000)
#define mcp_phys(addr) ((u32)(addr) - 0x05000000 + 0x081C0000)
#define mcp_rodata_phys(addr) ((u32)(addr) - 0x05060000 + 0x08220000)
#define mcp_data_phys(addr) ((u32)(addr) - 0x05074000 + 0x08234000)
#define mcp_d_r_phys(addr) ((u32)(addr) - 0x05100000 + 0x13D80000)
#define kernel_phys(addr) ((u32)(addr)) //just here for completion
#define acp_phys(addr) ((u32)(addr) - 0xE0000000 + 0x12900000)

void reverse_memcpy(void* dest, const void* src, unsigned int size);
unsigned int disable_mmu(void);
void restore_mmu(unsigned int control_register);
Expand Down
2 changes: 1 addition & 1 deletion dsrom/iosu_patcher/titleprot/ccd00.ld
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ OUTPUT_ARCH(arm)

MEMORY
{
RAMX (rx) : ORIGIN = 0x0510D988, LENGTH = 0x0000134
RAMX (rx) : ORIGIN = 0x0510D988, LENGTH = 0x0000024
}

SECTIONS
Expand Down
76 changes: 76 additions & 0 deletions dsrom/iosu_patcher/titleprot2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
endif

ifeq ($(filter $(DEVKITARM)/bin,$(PATH)),)
export PATH:=$(DEVKITARM)/bin:$(PATH)
endif

CC = arm-none-eabi-gcc
# LINK = arm-none-eabi-gcc
LINK = arm-none-eabi-ld
AS = arm-none-eabi-as
OBJCOPY = arm-none-eabi-objcopy
CFLAGS += -Wall -mbig-endian -std=c99 -mcpu=arm926ej-s -Os -s -mthumb -I$(DEVKITPRO)/libnds/include
LDFLAGS += --script=ccd00.ld -EB -L"$(DEVKITARM)/arm-none-eabi/lib"

CFILES = $(wildcard source/*.c)
BINFILES = $(wildcard data/*.*)
OFILES = $(CFILES:source/%.c=build/%.o)
DFILES = $(CFILES:source/%.c=build/%.d)
SFILES = $(wildcard source/*.s)
OFILES += $(SFILES:source/%.s=build/%.o)
OFILES += $(BINFILES:data/%=build/%.o)
PROJECTNAME = ${shell basename "$(CURDIR)"}
CWD = "$(CURDIR)""

#---------------------------------------------------------------------------------
# canned command sequence for binary data, taken from devkitARM
#---------------------------------------------------------------------------------
define bin2o
bin2s $< | $(AS) -o $(@)
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > source/`(echo $(<F) | tr . _)`.h
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> source/`(echo $(<F) | tr . _)`.h
echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> source/`(echo $(<F) | tr . _)`.h
endef

.PHONY:=all dirs

all: dirs $(PROJECTNAME).bin $(PROJECTNAME)_bin.h

dirs:
@mkdir -p build

$(PROJECTNAME).bin: $(PROJECTNAME).elf
# $(OBJCOPY) -O binary $< $@
$(OBJCOPY) -j .text -j .rodata -O binary $< $@

$(PROJECTNAME)_bin.h: $(PROJECTNAME).bin
xxd -i $< | sed "s/unsigned/static const unsigned/g;s/$(PROJECTNAME)$*/$(PROJECTNAME)/g" > $@

$(PROJECTNAME).elf: $(OFILES)
$(LINK) $(LDFLAGS) -o $(PROJECTNAME).elf $(sort $(filter-out build/crt0.o, $(OFILES)))

clean:
@rm -f build/*.o build/*.d
@rmdir build 2>/nul; true
@rm -f $(PROJECTNAME).elf $(PROJECTNAME).bin $(PROJECTNAME)_bin.h
@echo "all cleaned up !"

-include $(DFILES)

build/%.o: source/%.c
$(CC) $(CFLAGS) -c $< -o $@
@$(CC) -MM $< > build/$*.d

build/%.o: source/%.s
$(CC) $(CFLAGS) -xassembler-with-cpp -c $< -o $@
@$(CC) -MM $< > build/$*.d

build/%.bin.o: data/%.bin
@echo $(notdir $<)
@$(bin2o)

build/%.tga.o: data/%.tga
@echo $(notdir $<)
@$(bin2o)
Loading

0 comments on commit df41c59

Please sign in to comment.