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++
|
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)
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include <printf.h>
|
#include <cstdio>
|
||||||
#include <syscall.h>
|
|
||||||
#include <input-event-codes.h>
|
#include <input-event-codes.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <printf.h>
|
#include <cstdio>
|
||||||
|
|
||||||
const int SIZE = 100000;
|
const int SIZE = 100000;
|
||||||
double myarray[SIZE];
|
double myarray[SIZE];
|
||||||
|
Loading…
Reference in New Issue
Block a user