Merge pull request #728 from rudis/cppflags

kpatch-build: respect CPPFLAGS
This commit is contained in:
Joe Lawrence 2017-08-22 09:08:56 -04:00 committed by GitHub
commit 4a08e612a0
1 changed files with 2 additions and 8 deletions

View File

@ -1,7 +1,7 @@
include ../Makefile.inc include ../Makefile.inc
CFLAGS += -I../kmod/patch -Iinsn -Wall -g -Werror CFLAGS += -MMD -MP -I../kmod/patch -Iinsn -Wall -g -Werror
LDFLAGS += -lelf LDLIBS = -lelf
TARGETS = create-diff-object create-klp-module create-kpatch-module TARGETS = create-diff-object create-klp-module create-kpatch-module
SOURCES = create-diff-object.c kpatch-elf.c \ SOURCES = create-diff-object.c kpatch-elf.c \
@ -19,17 +19,11 @@ all: $(TARGETS)
-include $(SOURCES:.c=.d) -include $(SOURCES:.c=.d)
%.o : %.c
$(CC) -MMD -MP $(CFLAGS) -c -o $@ $<
create-diff-object: create-diff-object.o kpatch-elf.o \ create-diff-object: create-diff-object.o kpatch-elf.o \
lookup.o $(INSN) lookup.o $(INSN)
create-klp-module: create-klp-module.o kpatch-elf.o create-klp-module: create-klp-module.o kpatch-elf.o
create-kpatch-module: create-kpatch-module.o kpatch-elf.o create-kpatch-module: create-kpatch-module.o kpatch-elf.o
$(TARGETS):
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
install: all install: all
$(INSTALL) -d $(LIBEXECDIR) $(INSTALL) -d $(LIBEXECDIR)
$(INSTALL) $(TARGETS) kpatch-gcc $(LIBEXECDIR) $(INSTALL) $(TARGETS) kpatch-gcc $(LIBEXECDIR)