diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2,11 +2,13 @@ | |||
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 |
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 |
11 | endif | 13 | endif |
12 | ifeq ($(BUILD_STATIC),yes) | 14 | ifeq ($(BUILD_STATIC),yes) |
@@ -32,7 +34,7 @@ libdl.a: $(LIB_OBJS) | |||
32 | $(RANLIB) libdl.a | 34 | $(RANLIB) libdl.a |
33 | 35 | ||
34 | libdl.dll: $(LIB_OBJS) | 36 | libdl.dll: $(LIB_OBJS) |
35 | $(CC) $(SHFLAGS) -shared -o $@ $^ | 37 | $(CC) $(SHFLAGS) -shared -o $@ $^ $(LIBS) |
36 | 38 | ||
37 | libdl.lib: libdl.dll | 39 | libdl.lib: libdl.dll |
38 | $(LIBCMD) /machine:i386 /def:libdl.def | 40 | $(LIBCMD) /machine:i386 /def:libdl.def |
@@ -59,7 +61,7 @@ lib-install: $(LIBS) | |||
59 | install: $(INSTALL) | 61 | install: $(INSTALL) |
60 | 62 | ||
61 | test.exe: test.o $(TARGETS) | 63 | test.exe: test.o $(TARGETS) |
62 | $(CC) -o $@ $< -L. -ldl | 64 | $(CC) -o $@ $< -L. -ldl $(LIBS) |
63 | 65 | ||
64 | testdll.dll: testdll.c | 66 | testdll.dll: testdll.c |
65 | $(CC) -shared -o $@ $^ | 67 | $(CC) -shared -o $@ $^ |