new string.h implementation & tests
This commit is contained in:
24
host_test/Makefile
Normal file
24
host_test/Makefile
Normal file
@@ -0,0 +1,24 @@
|
||||
rose_objects = string.o
|
||||
objects = main.o
|
||||
CFLAGS = -m32 -mgeneral-regs-only -march=i386 -fno-stack-protector -Wno-int-conversion -c -Iinclude
|
||||
LFLAGS = -m32
|
||||
|
||||
all: test
|
||||
./test
|
||||
|
||||
test: $(objects) $(rose_objects)
|
||||
clang $(LFLAGS) -o $@ $^
|
||||
|
||||
%.o: ../%.nasm
|
||||
nasm -f elf32 -o $@ $<
|
||||
objcopy --prefix-symbols=rose_ $@
|
||||
|
||||
%.o: %.c
|
||||
clang $(CFLAGS) -ffunction-sections -fdata-sections -Os -o $@ $<
|
||||
|
||||
%.o: ../%.c
|
||||
clang $(CFLAGS) -nostdlib -ffunction-sections -fdata-sections -Os -o $@ $<
|
||||
objcopy --prefix-symbols=rose_ $@
|
||||
|
||||
clean:
|
||||
rm -f $(objects) $(rose_objects) test
|
Reference in New Issue
Block a user