From 519a1de7d9fe809efc4077933fabbe93a8da9439 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 20 May 2021 20:19:05 +0200 Subject: More generic makefile layout --- apps/generic.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 apps/generic.mk (limited to 'apps/generic.mk') 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 $@ -- cgit v1.2.3