X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/45e1f8b055043e54be35462852ab6649d634da7c..2a49908006b177c4d6354309333d06b1b96e4887:/lunaix-os/usr/sh/makefile diff --git a/lunaix-os/usr/sh/makefile b/lunaix-os/usr/sh/makefile new file mode 100644 index 0000000..bc10a4d --- /dev/null +++ b/lunaix-os/usr/sh/makefile @@ -0,0 +1,21 @@ +define src_files + sh.c +endef + +obj_files := $(addsuffix .o,$(src_files)) +include_opt := $(addprefix -I,$(INCLUDES)) + +out := $(BUILD_DIR)/bin + +%.c.o: %.c + $(call status_,CC,$<) + @$(CC) $(CFLAGS) $(include_opt) -c $< -o $@ + +$(out)/$(BUILD_NAME): $(obj_files) + $(call status_,LD,$(@F)) + @$(CC) -T $(LD_SCRIPT) -o $@ $< $(LIBC) $(LDFLAGS) + +all: $(out)/$(BUILD_NAME) + +clean: + @rm -f $(obj_files) \ No newline at end of file