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