feat: fstat now handle symbolic link
[lunaix-os.git] / lunaix-os / usr / stat / makefile
1 define src_files
2         main.c
3 endef
4
5 obj_files := $(addsuffix .o,$(src_files))
6 include_opt := $(addprefix -I,$(INCLUDES))
7
8 out := $(BUILD_DIR)/bin
9
10 %.c.o: %.c
11         $(call status_,CC,$<)
12         @$(CC) $(CFLAGS) $(include_opt) -c $< -o $@
13
14 $(out)/$(BUILD_NAME): $(obj_files)
15         $(call status_,LD,$(@F))
16         @$(CC) -T $(LD_SCRIPT) -o $@ $< $(LIBC) $(LDFLAGS)
17
18 all: $(out)/$(BUILD_NAME)
19
20 clean:
21         @rm -f $(obj_files)