Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- /dev/null Mon Apr 29 23:12:18 2013
- +++ Makefile-brightv Mon Apr 29 22:51:26 2013
- @@ -0,0 +1,65 @@
- +# How to use
- +#
- +# $ mkdir $(BD)/unix/uarm
- +# $ cd $(BD)/unix/uarm
- +# $ wget https://github.com/syuu1228/uARM/archive/master.zip
- +# $ unzip -x master.zip
- +# $ ln -s uARM-master src
- +# $ mkdir pcat
- +# $ cd pcat
- +# $ ln -s ../src/Makefile-brightv Makefile
- +# $ gmake
- +
- +DEPS = Dependencies
- +DEPENDENCIES_OUTPUT := $(DEPS)
- +
- +include ../../etc/makerules
- +
- +TARGET = uARM
- +
- +S = ../src
- +VPATH = $S
- +
- +HEADER := $(S) $(HEADER)
- +
- +SRC = main_pc.c
- +SRC += rt.c math64.c CPU.c MMU.c cp14.c cp15.c mem.c RAM.c callout_RAM.c SoC.c pxa255_IC.c icache.c pxa255_TIMR.c pxa255_RTC.c pxa255_UART.c pxa255_PwrClk.c pxa255_GPIO.c pxa255_DMA.c pxa255_DSP.c pxa255_LCD.c
- +
- +OBJ = $(addsuffix .o, $(basename $(SRC)))
- +WC_SRC = $(filter %.C, $(SRC))
- +
- +LOADLIBES = -lapp
- +
- +ifneq ($(mode), debug)
- + CFLAGS += -Wall
- +endif
- +CFLAGS += -D_BRIGHTV_
- +
- +#-----------------------------------------------------------------------------
- +.PHONY: all install clean
- +
- +ALL = $(TARGET) $(addsuffix .map, $(TARGET))
- +
- +all: $(ALL)
- +
- +$(TARGET): $(OBJ)
- + $(LINK.o) $(LDOBJS) $^ $(LOADLIBES) $(LDLIBS) $(OUTPUT_OPTION)
- +
- +clean:
- + $(RM) $(OBJ) $(WC_SRC:%.C=%.c) $(ALL) $(DEPS)
- +
- +install: $(addprefix $(EXE_INSTALLDIR)/, $(ALL))
- +
- +$(TARGET:%=$(EXE_INSTALLDIR)/%): $(EXE_INSTALLDIR)/%: %
- + $(EXE_INSTALL_STRIP)
- +
- +$(WC_SRC:%.C=%.c):
- +
- +$(OBJ):
- +
- +ifdef DEPENDENCIES_OUTPUT
- + $(DEPS): ; touch $(DEPS)
- +else
- + $(DEPS): $(SRC) ; $(MAKEDEPS) $@ $?
- +endif
- +include $(DEPS)
- --- types.h.orig Mon Apr 29 18:07:51 2013
- +++ types.h Mon Apr 29 22:43:48 2013
- @@ -1,6 +1,18 @@
- #ifndef _TYPES_H_
- #define _TYPES_H_
- +#if defined(_BRIGHTV_)
- +#include <typedef.h>
- +
- +typedef UW UInt32;
- +typedef W Int32;
- +typedef UH UInt16;
- +typedef H Int16;
- +typedef UB UInt8;
- +typedef B Int8;
- +typedef UB Err;
- +typedef UB Boolean;
- +#else
- #include <stdint.h>
- typedef uint32_t UInt32;
- @@ -11,6 +23,7 @@
- typedef int8_t Int8;
- typedef unsigned char Err;
- typedef unsigned char Boolean;
- +#endif
- #define true 1
- #define false 0
- @@ -47,6 +60,12 @@
- #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
- #include <sys/endian.h>
- #endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
- +
- +#if defined(_BRIGHTV_)
- +#include <machine/endian.h>
- +#define fseeko(stream, offset, whence) fseek(stream, offset, whence)
- +#define ftello(stream) ftell(stream)
- +#endif
- #ifndef LITTLE_ENDIAN
- #define LITTLE_ENDIAN (0xAABBCCDDUL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement