userspace: update Makefiles

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
2025-01-26 23:28:10 +02:00
parent 62e482facb
commit 1c5c0b524e
7 changed files with 14 additions and 17 deletions

View File

@ -1 +0,0 @@
init

View File

@ -10,10 +10,10 @@ OBJ = $(S_SOURCES:.S=.o) $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cpp=.o)
FILENAME = $(notdir $(shell pwd))
WARNCFLAG = -Wall -Wextra
build: $(FILENAME)
cp $(FILENAME) $(WORKSPACE_DIR)/out/bin/$(FILENAME)
build: $(FILENAME).elf
cp $(FILENAME).elf $(WORKSPACE_DIR)/out/bin/$(FILENAME)
$(FILENAME): $(OBJ)
$(FILENAME).elf: $(OBJ)
$(info Linking $@)
$(CC) $(LDFLAGS) $(SYSROOT) $(OBJ) -o $@
@ -30,4 +30,4 @@ $(FILENAME): $(OBJ)
$(AS) -o $@ $<
clean:
rm -f $(OBJ) $(FILENAME)
rm -f $(OBJ) $(FILENAME).elf