Luna/apps/Makefile
apio 7d20c507b1 Kernel, libc, userspace: Implement command-line arguments (argv)
The only thing missing now is for sh to pass them on.
2022-10-26 18:57:06 +02:00

22 lines
487 B
Makefile

APPS := init sym sh crash uname uptime hello ps ls args
APPS_DIR := $(LUNA_ROOT)/apps
APPS_SRC := $(APPS_DIR)/src
APPS_BIN := $(APPS_DIR)/bin
REAL_APPS := $(patsubst %, $(APPS_BIN)/%, $(APPS))
CFLAGS := -Wall -Wextra -Werror -Os -fno-asynchronous-unwind-tables
$(APPS_BIN)/%: $(APPS_SRC)/%.c
@mkdir -p $(@D)
$(CC) $(CFLAGS) -o $@ $^
build: $(REAL_APPS)
install: $(REAL_APPS)
@mkdir -p $(LUNA_ROOT)/initrd/bin
cp $(REAL_APPS) $(LUNA_ROOT)/initrd/bin
clean:
rm -f $(APPS_BIN)/*