mirror of
https://github.com/dynup/kpatch
synced 2024-12-25 23:02:02 +00:00
Merge pull request #433 from spartacus06/fixup-makefile
improve kpatch-build Makefile
This commit is contained in:
commit
f69d258c0b
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@
|
||||
*.ko.cmd
|
||||
*.mod.c
|
||||
*.swp
|
||||
*.d
|
||||
.tmp_versions
|
||||
Module.symvers
|
||||
kpatch-build/lookup
|
||||
|
@ -4,13 +4,18 @@ CFLAGS += -I../kmod/patch -Iinsn -Wall -g
|
||||
LDFLAGS = -lelf
|
||||
|
||||
TARGETS = create-diff-object
|
||||
OBJS = create-diff-object.o lookup.o insn/insn.o insn/inat.o
|
||||
SOURCES = create-diff-object.c lookup.c insn/insn.c insn/inat.c
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
create-diff-object: create-diff-object.c list.h lookup.c lookup.h insn/insn.c \
|
||||
insn/inat.c insn/inat-tables.c insn/asm/inat.h \
|
||||
insn/asm/insn.h insn/asm/inat_types.h
|
||||
$(CC) $(CFLAGS) create-diff-object.c lookup.c insn/insn.c insn/inat.c -o $@ $(LDFLAGS)
|
||||
-include $(SOURCES:.c=.d)
|
||||
|
||||
%.o : %.c
|
||||
$(CC) -MMD -MP $(CFLAGS) -c -o $@ $<
|
||||
|
||||
create-diff-object: $(OBJS)
|
||||
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
||||
|
||||
install: all
|
||||
$(INSTALL) -d $(LIBEXECDIR)
|
||||
@ -23,4 +28,4 @@ uninstall:
|
||||
$(RM) $(BINDIR)/kpatch-build
|
||||
|
||||
clean:
|
||||
$(RM) $(TARGETS)
|
||||
$(RM) $(TARGETS) $(OBJS) *.d insn/*.d
|
||||
|
Loading…
Reference in New Issue
Block a user