aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2b03051..aec9ba8 100644
--- a/Makefile
+++ b/Makefile
@@ -2,11 +2,13 @@
2# dlfcn-win32 Makefile 2# dlfcn-win32 Makefile
3# 3#
4include config.mak 4include config.mak
5CFLAGS=-Wall -O3 -fomit-frame-pointer 5CFLAGS = -Wall -O3 -fomit-frame-pointer
6LIBS += -lpsapi
6 7
7ifeq ($(BUILD_SHARED),yes) 8ifeq ($(BUILD_SHARED),yes)
8 TARGETS += libdl.dll 9 TARGETS += libdl.dll
9 SHFLAGS += -Wl,--out-implib,libdl.dll.a 10 SHFLAGS += -Wl,--out-implib,libdl.dll.a
11 CFLAGS += -DSHARED
10 INSTALL += shared-install 12 INSTALL += shared-install
11endif 13endif
12ifeq ($(BUILD_STATIC),yes) 14ifeq ($(BUILD_STATIC),yes)
@@ -32,7 +34,7 @@ libdl.a: $(LIB_OBJS)
32 $(RANLIB) libdl.a 34 $(RANLIB) libdl.a
33 35
34libdl.dll: $(LIB_OBJS) 36libdl.dll: $(LIB_OBJS)
35 $(CC) $(SHFLAGS) -shared -o $@ $^ 37 $(CC) $(SHFLAGS) -shared -o $@ $^ $(LIBS)
36 38
37libdl.lib: libdl.dll 39libdl.lib: libdl.dll
38 $(LIBCMD) /machine:i386 /def:libdl.def 40 $(LIBCMD) /machine:i386 /def:libdl.def
@@ -59,7 +61,7 @@ lib-install: $(LIBS)
59install: $(INSTALL) 61install: $(INSTALL)
60 62
61test.exe: test.o $(TARGETS) 63test.exe: test.o $(TARGETS)
62 $(CC) -o $@ $< -L. -ldl 64 $(CC) -o $@ $< -L. -ldl $(LIBS)
63 65
64testdll.dll: testdll.c 66testdll.dll: testdll.c
65 $(CC) -shared -o $@ $^ 67 $(CC) -shared -o $@ $^