Hello user process
This commit is contained in:
2
user/hello/.gitignore
vendored
Normal file
2
user/hello/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*.o
|
||||
hello
|
21
user/hello/Makefile
Normal file
21
user/hello/Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
include ../Makefile.inc
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
TARGET := hello
|
||||
|
||||
SRCFILES := $(wildcard *.s)
|
||||
ASFILES := $(filter %.s,$(SRCFILES))
|
||||
OBJ := $(patsubst %.s,%.o,$(ASFILES))
|
||||
|
||||
%.o: %.s
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
hello: $(OBJ)
|
||||
$(LD) $^ $(LDFLAGS) -o $@
|
||||
echo "$(realpath $@)" >> $(FILES)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET)
|
6
user/hello/hello.s
Normal file
6
user/hello/hello.s
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
.spin:
|
||||
jmp .spin
|
||||
|
Reference in New Issue
Block a user