aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2014-10-08 15:50:21 -0700
committerTimothy Gu <timothygu99@gmail.com>2015-03-15 17:15:14 -0700
commitdd4254a3d9d26cd436f984515570ec8cd211ee33 (patch)
treea83495b3a2497d16c9d36a8def435fc3bca9c61a /Makefile
parent5ea707adea4146a64c38106a9bad11b01f74f0ef (diff)
downloaddlfcn-win32-dd4254a3d9d26cd436f984515570ec8cd211ee33.tar.gz
dlfcn-win32-dd4254a3d9d26cd436f984515570ec8cd211ee33.tar.bz2
dlfcn-win32-dd4254a3d9d26cd436f984515570ec8cd211ee33.zip
Add linked modules to a separate global list
Fixes #2.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 0f32932..aec9ba8 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,8 @@
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
@@ -33,7 +34,7 @@ libdl.a: $(LIB_OBJS)
33 $(RANLIB) libdl.a 34 $(RANLIB) libdl.a
34 35
35libdl.dll: $(LIB_OBJS) 36libdl.dll: $(LIB_OBJS)
36 $(CC) $(SHFLAGS) -shared -o $@ $^ 37 $(CC) $(SHFLAGS) -shared -o $@ $^ $(LIBS)
37 38
38libdl.lib: libdl.dll 39libdl.lib: libdl.dll
39 $(LIBCMD) /machine:i386 /def:libdl.def 40 $(LIBCMD) /machine:i386 /def:libdl.def
@@ -60,7 +61,7 @@ lib-install: $(LIBS)
60install: $(INSTALL) 61install: $(INSTALL)
61 62
62test.exe: test.o $(TARGETS) 63test.exe: test.o $(TARGETS)
63 $(CC) -o $@ $< -L. -ldl 64 $(CC) -o $@ $< -L. -ldl $(LIBS)
64 65
65testdll.dll: testdll.c 66testdll.dll: testdll.c
66 $(CC) -shared -o $@ $^ 67 $(CC) -shared -o $@ $^