mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
-static is required, otherwise the dynamic linker is wrong. There is no clang support in Buildroot it seems: https://elinux.org/Buildroot:GSoC2017Ideas#Support_for_LLVM Initially done for: https://github.com/cirosantilli/linux-kernel-module-cheat/issues/22
17 lines
305 B
Makefile
17 lines
305 B
Makefile
.PHONY: all clean
|
|
|
|
CFLAGS_EXTRA ?= -ggdb3 -O0 -std=c99 -Wall -Werror -Wextra
|
|
IN_EXT ?= .c
|
|
LIBS :=
|
|
OUT_EXT ?= .out
|
|
|
|
OUTS := $(addsuffix $(OUT_EXT), $(basename $(wildcard *$(IN_EXT))))
|
|
|
|
all: $(OUTS)
|
|
|
|
%$(OUT_EXT): %$(IN_EXT)
|
|
$(CC) $(CFLAGS) $(CFLAGS_EXTRA) -o '$@' '$<' $(LIBS)
|
|
|
|
clean:
|
|
rm -f *'$(OUT_EXT)'
|