-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 713 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
SHELL = /bin/sh
CC = gcc
.PHONY: all install clean
.DEFAULT: all
CFLAGS += -Iinsn -Wall -g
LDFLAGS = -lelf
TARGETS = create-diff-object prelink
CREATE_DIFF_OBJECT_OBJS = create-diff-object.o lookup.o insn/insn.o insn/inat.o common.o
PRELINK_OBJS = prelink.o lookup.o insn/insn.o insn/inat.o common.o
SOURCES = create-diff-object.c prelink.c lookup.c insn/insn.c insn/inat.c common.c
all: $(TARGETS)
-include $(SOURCES:.c=.d)
%.o : %.c
$(CC) -MMD -MP $(CFLAGS) -c -o $@ $<
create-diff-object: $(CREATE_DIFF_OBJECT_OBJS)
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
prelink: $(PRELINK_OBJS)
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
clean:
$(RM) $(TARGETS) $(CREATE_DIFF_OBJECT_OBJS) $(PRELINK_OBJS) *.d insn/*.d