aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSilvio Traversaro <silvio@traversaro.it>2019-05-20 23:41:19 +0200
committerGitHub <noreply@github.com>2019-05-20 23:41:19 +0200
commit0fc1d9de6fea764866ecbfc10d7cf431bece033b (patch)
treecdd5423fa05e56af5ea604edb8334a6692383365 /Makefile
parent84295c9afc0b42a61cf687d54c3bd5e286fd5176 (diff)
parentf3da31d7a3e4b300f325624bf4e424c3bbcd521b (diff)
downloaddlfcn-win32-1.2.0.tar.gz
dlfcn-win32-1.2.0.tar.bz2
dlfcn-win32-1.2.0.zip
Merge pull request #51 from pali/masterv1.2.0
Load Psapi.dll at runtime, this avoids linking caveat
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 4 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index efac5af..9f5985e 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,6 @@
3# 3#
4include config.mak 4include config.mak
5CFLAGS = -Wall -O3 -fomit-frame-pointer 5CFLAGS = -Wall -O3 -fomit-frame-pointer
6LIBS += -lpsapi
7 6
8ifeq ($(BUILD_SHARED),yes) 7ifeq ($(BUILD_SHARED),yes)
9 TARGETS += libdl.dll 8 TARGETS += libdl.dll
@@ -34,7 +33,7 @@ libdl.a: $(LIB_OBJS)
34 $(RANLIB) libdl.a 33 $(RANLIB) libdl.a
35 34
36libdl.dll: $(LIB_OBJS) 35libdl.dll: $(LIB_OBJS)
37 $(CC) $(SHFLAGS) -shared -o $@ $^ $(LIBS) 36 $(CC) $(SHFLAGS) -shared -o $@ $^
38 37
39libdl.lib: libdl.dll 38libdl.lib: libdl.dll
40 $(LIBCMD) /machine:i386 /def:libdl.def 39 $(LIBCMD) /machine:i386 /def:libdl.def
@@ -54,20 +53,20 @@ static-install: include-install
54 mkdir -p $(DESTDIR)$(libdir) 53 mkdir -p $(DESTDIR)$(libdir)
55 cp libdl.a $(DESTDIR)$(libdir) 54 cp libdl.a $(DESTDIR)$(libdir)
56 55
57lib-install: $(LIBS) 56lib-install:
58 mkdir -p $(DESTDIR)$(libdir) 57 mkdir -p $(DESTDIR)$(libdir)
59 cp libdl.lib $(DESTDIR)$(libdir) 58 cp libdl.lib $(DESTDIR)$(libdir)
60 59
61install: $(INSTALL) 60install: $(INSTALL)
62 61
63test.exe: test.o $(TARGETS) 62test.exe: test.o $(TARGETS)
64 $(CC) -o $@ $< -L. -ldl $(LIBS) 63 $(CC) -o $@ $< -L. -ldl
65 64
66testdll.dll: testdll.c 65testdll.dll: testdll.c
67 $(CC) -shared -o $@ $^ 66 $(CC) -shared -o $@ $^
68 67
69testdll2.dll: testdll2.c $(TARGETS) 68testdll2.dll: testdll2.c $(TARGETS)
70 $(CC) -shared -o $@ $< -L. -ldl $(LIBS) 69 $(CC) -shared -o $@ $< -L. -ldl
71 70
72testdll3.dll: testdll3.c 71testdll3.dll: testdll3.c
73 $(CC) -shared -o $@ $^ 72 $(CC) -shared -o $@ $^