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/init/Makefile | 17 ++++------------- apps/init/init.c | 15 --------------- apps/init/main.c | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 28 deletions(-) delete mode 100644 apps/init/init.c create mode 100644 apps/init/main.c (limited to 'apps/init') diff --git a/apps/init/Makefile b/apps/init/Makefile index 68038d0..aa0ac8b 100644 --- a/apps/init/Makefile +++ b/apps/init/Makefile @@ -1,16 +1,7 @@ # MIT License, Copyright (c) 2021 Marvin Borner -OBJS = init.o +NAME = init +OBJS = main.o +LIBS = -lc -all: $(OBJS) - @mkdir -p $(BUILD)/apps/init/ - @$(LD) -o $(BUILD)/apps/init/exec $(LDFLAGS) $^ -lc -ifeq ($(CONFIG_STRIP), true) - @$(ST) --strip-all $(BUILD)/apps/init/exec -endif - -clean: - @$(RM) -f $(OBJS) - -%.o: %.c - @$(CC) -c $(CFLAGS) $< -o $@ +include ../generic.mk diff --git a/apps/init/init.c b/apps/init/init.c deleted file mode 100644 index 44cf461..0000000 --- a/apps/init/init.c +++ /dev/null @@ -1,15 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#include -#include -#include - -int main(int argc, char **argv) -{ - UNUSED(argc); - UNUSED(argv); - - assert(exec("wm", NULL) == EOK); - - return 0; -} diff --git a/apps/init/main.c b/apps/init/main.c new file mode 100644 index 0000000..44cf461 --- /dev/null +++ b/apps/init/main.c @@ -0,0 +1,15 @@ +// MIT License, Copyright (c) 2020 Marvin Borner + +#include +#include +#include + +int main(int argc, char **argv) +{ + UNUSED(argc); + UNUSED(argv); + + assert(exec("wm", NULL) == EOK); + + return 0; +} -- cgit v1.2.3