Skip to content

Commit

Permalink
Add the ability to rename symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno committed Jul 1, 2015
1 parent cbbf9cf commit bdb576d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ LIBOSXUNWIND_HOME = $(abspath .)

CC = clang
AR = ar
OBJCONV = objconv

# Flags

CPPFLAGS_add = -I$(LIBOSXUNWIND_HOME)/src -I$(LIBOSXUNWIND_HOME)/include -DNDEBUG
CFLAGS_add = -std=c99 -Wall -O3
CXXFLAGS_add = -std=c++11 -Wall -O3
CFLAGS_add = -std=c99 -Wall -O3
CXXFLAGS_add = -std=c++11 -Wall -O3
LDFLAGS_add = -nodefaultlibs -Wl,-upward-lSystem -Wl,-umbrella,System -lstdc++

# Files (in src/)
Expand All @@ -30,7 +31,7 @@ SRCS = Unwind-sjlj.c \
UnwindLevel1.c \
libuwind.cxx \
unw_getcontext.s \
Registers.s
Registers.s


# Building
Expand All @@ -55,9 +56,15 @@ OBJS = $(patsubst %.c,%.c.o, \


libosxunwind.a: $(OBJS)
ifeq (,$(SYMFILE))
$(AR) -rcs libosxunwind.a $(OBJS)
else
$(AR) -rcs libosxunwind.a.orig $(OBJS)
$(OBJCONV) @$(SYMFILE) libosxunwind.a.orig libosxunwind.a
endif

libosxunwind.dylib: $(OBJS)
$(CC) -shared $(LDFLAGS_add) $(OBJS) $(LDFLAGS) -o libosxunwind.dylib
$(CC) -shared $(LDFLAGS_add) libosxunwind.a $(LDFLAGS) -o libosxunwind.dylib

clean:
rm -f $(OBJS) *.a *.dylib
Expand Down

0 comments on commit bdb576d

Please sign in to comment.