File tree Expand file tree Collapse file tree 7 files changed +38
-0
lines changed
Expand file tree Collapse file tree 7 files changed +38
-0
lines changed File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ ARCH ?= x86_64
2+ C_COMPILER := $(shell which $(CC ) )
3+ CXX_COMPILER := $(shell which $(CC ) )
4+ AR := $(shell which $(AR ) )
5+ RANLIB := $(shell which $(RANLIB ) )
6+ CROSS_COMPILE_PATH := $(shell dirname $(C_COMPILER ) ) /..
7+
8+ app-objs := main.o
9+
10+ $(APP ) /$(app-objs ) : $(APP ) /axbuild.mk
11+ $(CXX_COMPILER ) -c -o $(app-objs ) $(APP ) /main.cpp
12+ $(LD ) -o $(app-objs ) -nostdlib -static -no-pie -r -e main \
13+ $(app-objs ) \
14+ $(CROSS_COMPILE_PATH ) /* -linux-musl/lib/libstdc++.a \
15+ $(CROSS_COMPILE_PATH ) /lib/gcc/* -linux-musl/* /libgcc_eh.a
16+
17+ clean_c ::
18+ rm -rf $(APP ) /$(app-objs )
19+
20+ .PHONY : $(APP ) /$(app-objs ) clean_c
Original file line number Diff line number Diff line change 1+ alloc
2+ paging
3+ irq
4+ multitask
5+ fs
6+ random-hw
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+
3+ using namespace std ;
4+
5+ // This is a dummy function to avoid linker errors as this example should be a static executable.
6+ void * __dso_handle = NULL ;
7+
8+ int main (int argc, char * argv[]) {
9+ cout << " Hello, wolrd!" << endl;
10+ return 0 ;
11+ }
12+
You can’t perform that action at this time.
0 commit comments