mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Merge branch 'master' of https://github.com/pret/pokeemerald into fix_perms
This commit is contained in:
commit
26624e2414
5
Makefile
5
Makefile
@ -30,8 +30,7 @@ LDFLAGS = -Map ../../$(MAP)
|
|||||||
|
|
||||||
OBJCOPY := $(DEVKITARM)/bin/arm-none-eabi-objcopy
|
OBJCOPY := $(DEVKITARM)/bin/arm-none-eabi-objcopy
|
||||||
|
|
||||||
LIBGCC := tools/agbcc/lib/libgcc.a
|
LIB := -L ../../tools/agbcc/lib -lgcc -lc
|
||||||
LIBC := tools/agbcc/lib/libc.a
|
|
||||||
|
|
||||||
SHA1 := sha1sum -c
|
SHA1 := sha1sum -c
|
||||||
|
|
||||||
@ -163,7 +162,7 @@ $(OBJ_DIR)/ld_script.ld: ld_script.txt $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_comm
|
|||||||
cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../../$< | sed "s#tools/#../../tools/#g" > ld_script.ld
|
cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../../$< | sed "s#tools/#../../tools/#g" > ld_script.ld
|
||||||
|
|
||||||
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
|
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
|
||||||
cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) ../../$(LIBGCC) ../../$(LIBC)
|
cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB)
|
||||||
|
|
||||||
$(ROM): $(ELF)
|
$(ROM): $(ELF)
|
||||||
$(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@
|
$(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef GUARD_GLOBAL_H
|
#ifndef GUARD_GLOBAL_H
|
||||||
#define GUARD_GLOBAL_H
|
#define GUARD_GLOBAL_H
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include "config.h" // we need to define config before gba headers as print stuff needs the functions nulled before defines.
|
#include "config.h" // we need to define config before gba headers as print stuff needs the functions nulled before defines.
|
||||||
#include "gba/gba.h"
|
#include "gba/gba.h"
|
||||||
|
|
||||||
@ -11,11 +12,16 @@
|
|||||||
#define asm_comment(x) asm volatile("@ -- " x " -- ")
|
#define asm_comment(x) asm volatile("@ -- " x " -- ")
|
||||||
#define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided")
|
#define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided")
|
||||||
|
|
||||||
|
// IDE support
|
||||||
#if defined (__APPLE__) || defined (__CYGWIN__)
|
#if defined (__APPLE__) || defined (__CYGWIN__)
|
||||||
void *memset(void *, int, size_t);
|
#define _(x) x
|
||||||
void *memcpy(void *, const void *, size_t);
|
#define __(x) x
|
||||||
int strcmp(const char *s1, const char *s2);
|
#define INCBIN_U8 {0}
|
||||||
char* strcpy(char *dst0, const char *src0);
|
#define INCBIN_U16 {0}
|
||||||
|
#define INCBIN_U32 {0}
|
||||||
|
#define INCBIN_S8 {0}
|
||||||
|
#define INCBIN_S16 {0}
|
||||||
|
#define INCBIN_S32 {0}
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
|
||||||
#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
|
#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
|
||||||
|
Loading…
Reference in New Issue
Block a user