]> git.wh0rd.org - ICEs.git/blame - add-gnu-debuglink/Makefile
initial import
[ICEs.git] / add-gnu-debuglink / Makefile
CommitLineData
45516216 1OBJCOPY ?= objcopy
2CFLAGS += -g -Wall -O2 -pipe
3LDFLAGS += -Wl,-z,relro
4LDFLAGS += -Wl,-O1
5LDFLAGS += -Wl,--enable-new-dtags
6LDFLAGS += -Wl,--hash-style=both
7#LDFLAGS += -Wl,--disable-new-dtags
8#LDFLAGS += -Wl,--hash-style=sysv
9
10def:
11 $(MAKE) clean all
12
13all: foo.dbg
14 $(OBJCOPY) --strip-debug foo
15 $(OBJCOPY) --add-gnu-debuglink=foo.dbg foo
16
17foo.dbg: foo
18 $(OBJCOPY) --only-keep-debug foo foo.dbg
19
20clean:
21 rm -f foo foo.dbg
22
23.PHONY: all clean