diff options
author | Marvin Borner | 2021-05-20 20:19:05 +0200 |
---|---|---|
committer | Marvin Borner | 2021-05-20 20:19:05 +0200 |
commit | 519a1de7d9fe809efc4077933fabbe93a8da9439 (patch) | |
tree | be9d636e48036b42c8c6cc490b5f53db8b4f3a2e /apps/generic.mk | |
parent | 59de0af0cff96182d3e30ab453bc9763a6635947 (diff) |
More generic makefile layout
Diffstat (limited to 'apps/generic.mk')
-rw-r--r-- | apps/generic.mk | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/generic.mk b/apps/generic.mk new file mode 100644 index 0000000..f2bc936 --- /dev/null +++ b/apps/generic.mk @@ -0,0 +1,17 @@ +# MIT License, Copyright (c) 2021 Marvin Borner + +NAME ?= unknown +LIBS ?= -lc + +all: $(OBJS) + @mkdir -p $(BUILD)/apps/$(NAME)/ + @$(LD) -o $(BUILD)/apps/$(NAME)/exec $(LDFLAGS) $^ $(LIBS) +ifeq ($(CONFIG_STRIP), true) + @$(ST) --strip-all $(BUILD)/apps/wm/exec +endif + +clean: + @$(RM) -f $(OBJS) + +%.o: %.c + @$(CC) -c $(CFLAGS) $< -o $@ |