diff options
author | Timothy Gu <timothygu99@gmail.com> | 2014-10-08 15:50:21 -0700 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2015-03-15 17:15:14 -0700 |
commit | dd4254a3d9d26cd436f984515570ec8cd211ee33 (patch) | |
tree | a83495b3a2497d16c9d36a8def435fc3bca9c61a /Makefile | |
parent | 5ea707adea4146a64c38106a9bad11b01f74f0ef (diff) | |
download | dlfcn-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-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2,7 +2,8 @@ | |||
2 | # dlfcn-win32 Makefile | 2 | # dlfcn-win32 Makefile |
3 | # | 3 | # |
4 | include config.mak | 4 | include config.mak |
5 | CFLAGS=-Wall -O3 -fomit-frame-pointer | 5 | CFLAGS = -Wall -O3 -fomit-frame-pointer |
6 | LIBS += -lpsapi | ||
6 | 7 | ||
7 | ifeq ($(BUILD_SHARED),yes) | 8 | ifeq ($(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 | ||
35 | libdl.dll: $(LIB_OBJS) | 36 | libdl.dll: $(LIB_OBJS) |
36 | $(CC) $(SHFLAGS) -shared -o $@ $^ | 37 | $(CC) $(SHFLAGS) -shared -o $@ $^ $(LIBS) |
37 | 38 | ||
38 | libdl.lib: libdl.dll | 39 | libdl.lib: libdl.dll |
39 | $(LIBCMD) /machine:i386 /def:libdl.def | 40 | $(LIBCMD) /machine:i386 /def:libdl.def |
@@ -60,7 +61,7 @@ lib-install: $(LIBS) | |||
60 | install: $(INSTALL) | 61 | install: $(INSTALL) |
61 | 62 | ||
62 | test.exe: test.o $(TARGETS) | 63 | test.exe: test.o $(TARGETS) |
63 | $(CC) -o $@ $< -L. -ldl | 64 | $(CC) -o $@ $< -L. -ldl $(LIBS) |
64 | 65 | ||
65 | testdll.dll: testdll.c | 66 | testdll.dll: testdll.c |
66 | $(CC) -shared -o $@ $^ | 67 | $(CC) -shared -o $@ $^ |