mirror of
https://github.com/sgmarz/osblog.git
synced 2024-11-23 18:06:20 +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:
parent
7e34e30bfa
commit
f2055f301b
@ -1,23 +1,15 @@
|
||||
CROSS=riscv64-unknown-linux-gnu-
|
||||
CROSS=riscv64-unknown-elf-
|
||||
CXX=g++
|
||||
OBJCOPY=objcopy
|
||||
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
|
||||
CXXFLAGS=-Wall -O3 -static -I.
|
||||
SOURCES=$(wildcard *.cpp)
|
||||
OUT=$(patsubst %.cpp,%.elf,$(SOURCES))
|
||||
PROGS=$(patsubst %.cpp,%,$(SOURCES))
|
||||
OUT=$(patsubst %.cpp,%,$(SOURCES))
|
||||
|
||||
all: $(OUT)
|
||||
|
||||
%.elf:%.cpp Makefile startlib/linker.lds startlib/*.h
|
||||
$(CROSS)$(CXX) $(CXXFLAGS) $(INCLUDES) $(LIBS) -o $@ $< $(LIB)
|
||||
$(CROSS)$(OBJCOPY) -O binary $@ $@.bin
|
||||
mv $@.bin $(basename $@)
|
||||
|
||||
%: %.cpp Makefile
|
||||
$(CROSS)$(CXX) $(CXXFLAGS) -o $@ $<
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OUT)
|
||||
rm -f *.bin *.elf
|
||||
rm -f $(PROGS)
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include <printf.h>
|
||||
#include <syscall.h>
|
||||
#include <cstdio>
|
||||
#include <input-event-codes.h>
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <printf.h>
|
||||
#include <cstdio>
|
||||
|
||||
const int SIZE = 100000;
|
||||
double myarray[SIZE];
|
||||
|
Loading…
Reference in New Issue
Block a user