Fixup C++ compiler path in makefile of CoreLib
memcpy implementation added
This commit is contained in:
parent
644ff5b1f5
commit
745656eb2d
@ -1,4 +1,4 @@
|
||||
CPP = ${HOME}/opt/cross/bin/i686-elf-g++
|
||||
CPP = /opt/cross/bin/i686-elf-g++
|
||||
CFLAGS = -ffreestanding -Og -ggdb -Wall -Wextra
|
||||
|
||||
BUILD_DIR = ../build/CoreLib
|
||||
@ -12,6 +12,7 @@ all: $(OUTPUTFILE)
|
||||
cp *.h $(BUILD_DIR)/include/CoreLib
|
||||
|
||||
$(OUTPUTFILE): $(OFILES)
|
||||
pwd
|
||||
ar -rc $(OUTPUTFILE) $(OFILES)
|
||||
|
||||
$(OBJ_FOLDER)/memory.o: Memory.cpp
|
||||
|
@ -32,6 +32,17 @@ int memcmp( const void* ptr1, const void* ptr2, size_t num)
|
||||
|
||||
}
|
||||
|
||||
void memcpy (void* dest, const void* src, size_t count ){
|
||||
for( int i = 0; i < count; i++){
|
||||
((char *)dest)[i] = ((const char*)src)[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
size_t strlen(const char* str) {
|
||||
size_t len = 0;
|
||||
while(str[len]){
|
||||
|
@ -7,6 +7,8 @@ void* memset (void* ptr, int value, size_t num);
|
||||
|
||||
int memcmp( const void* ptr1, const void* ptr2, size_t num);
|
||||
|
||||
void memcpy (void* dest, const void* src, size_t count );
|
||||
|
||||
size_t strlen(const char* str);
|
||||
|
||||
int strncmp ( const char* str1, const char* str2, size_t num );
|
||||
|
Loading…
Reference in New Issue
Block a user