mirror of
https://github.com/darlinghq/darling.git
synced 2025-03-01 14:16:31 +00:00
Create libmac.so in the top directory
This commit is contained in:
parent
79ec7a844f
commit
5c6869d091
4
Makefile
4
Makefile
@ -6,7 +6,7 @@ GCCFLAGS=-g -Iinclude -Wall -MMD -fno-omit-frame-pointer -O $(GCC_EXTRA_FLAGS)
|
||||
CXXFLAGS=$(GCCFLAGS) -W -Werror
|
||||
CFLAGS=$(GCCFLAGS) -fPIC
|
||||
|
||||
EXES=libmac/libmac.so extract macho2elf ld-mac
|
||||
EXES=libmac.so extract macho2elf ld-mac
|
||||
|
||||
MAC_C_SRCS=$(wildcard mach/*.c)
|
||||
MAC_CXX_SRCS=$(wildcard mach/*.cc)
|
||||
@ -67,7 +67,7 @@ ld-mac: ld-mac.o mach-o.o fat.o log.o
|
||||
$(CXX) $^ -o $@ -g -ldl -lpthread $(GCC_EXTRA_FLAGS)
|
||||
|
||||
# TODO(hamaji): autotoolize?
|
||||
libmac/libmac.so: libmac/mac.o
|
||||
libmac.so: libmac/mac.o
|
||||
$(CC) -shared $^ -o $@ -lcrypto $(GCC_EXTRA_FLAGS)
|
||||
|
||||
dist:
|
||||
|
@ -858,10 +858,6 @@ static bool loadLibMac(const char* mypath) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dlopen("libmac/libmac.so", RTLD_LAZY | RTLD_GLOBAL)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
char buf[PATH_MAX + 100];
|
||||
strcpy(buf, mypath);
|
||||
char* p = strrchr(buf, '/');
|
||||
@ -869,9 +865,9 @@ static bool loadLibMac(const char* mypath) {
|
||||
fprintf(stderr, "Weird loader path: %s\n", mypath);
|
||||
exit(1);
|
||||
}
|
||||
strcpy(p, "/libmac/libmac.so");
|
||||
strcpy(p, "/libmac.so");
|
||||
|
||||
if (dlopen(buf, RTLD_NOW | RTLD_GLOBAL)) {
|
||||
if (dlopen(buf, RTLD_LAZY | RTLD_GLOBAL)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user