1
0
mirror of https://github.com/sgmarz/osblog.git synced 2024-11-24 02:16:19 +04:00

Update makefile to use newlib instead of our startlib. We need to rewrite fb.cpp now to use the new system.

This commit is contained in:
Stephen Marz 2020-06-04 13:02:13 -04:00
parent 7e34e30bfa
commit f2055f301b
3 changed files with 9 additions and 18 deletions

View File

@ -1,23 +1,15 @@
CROSS=riscv64-unknown-linux-gnu- CROSS=riscv64-unknown-elf-
CXX=g++ CXX=g++
OBJCOPY=objcopy CXXFLAGS=-Wall -O3 -static -I.
CXXFLAGS=-Wall -O3 -ffreestanding -nostartfiles -nostdlib -static -march=rv64gc -mabi=lp64d
LINKER_SCRIPT=-T./startlib/linker.lds
INCLUDES=-I./startlib
LIBS=-L./startlib
LIB=-lstart
SOURCES=$(wildcard *.cpp) SOURCES=$(wildcard *.cpp)
OUT=$(patsubst %.cpp,%.elf,$(SOURCES)) OUT=$(patsubst %.cpp,%,$(SOURCES))
PROGS=$(patsubst %.cpp,%,$(SOURCES))
all: $(OUT) all: $(OUT)
%.elf:%.cpp Makefile startlib/linker.lds startlib/*.h
$(CROSS)$(CXX) $(CXXFLAGS) $(INCLUDES) $(LIBS) -o $@ $< $(LIB) %: %.cpp Makefile
$(CROSS)$(OBJCOPY) -O binary $@ $@.bin $(CROSS)$(CXX) $(CXXFLAGS) -o $@ $<
mv $@.bin $(basename $@)
clean: clean:
rm -f $(OUT) rm -f $(OUT)
rm -f *.bin *.elf
rm -f $(PROGS)

View File

@ -1,5 +1,4 @@
#include <printf.h> #include <cstdio>
#include <syscall.h>
#include <input-event-codes.h> #include <input-event-codes.h>

View File

@ -1,4 +1,4 @@
#include <printf.h> #include <cstdio>
const int SIZE = 100000; const int SIZE = 100000;
double myarray[SIZE]; double myarray[SIZE];