aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2020-09-14 12:21:55 +0200
committerRalf Habacker <ralf.habacker@freenet.de>2020-09-14 12:27:34 +0200
commitfaa2ff8073d03cb37d5ce9ffdcdee5cd01c09e4b (patch)
tree047f10ceaed30dfc21c1843626356b4dac9248e3
parent218e7785eab5e7856e6fb35b7db4a506b6521831 (diff)
downloaddlfcn-win32-faa2ff8073d03cb37d5ce9ffdcdee5cd01c09e4b.tar.gz
dlfcn-win32-faa2ff8073d03cb37d5ce9ffdcdee5cd01c09e4b.tar.bz2
dlfcn-win32-faa2ff8073d03cb37d5ce9ffdcdee5cd01c09e4b.zip
Makefile: Adjust paths of source files, which are now located in subdirectories
-rw-r--r--Makefile20
1 files changed, 10 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 89c5d68..ab7279b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
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 -Isrc
6 6
7ifeq ($(BUILD_SHARED),yes) 7ifeq ($(BUILD_SHARED),yes)
8 TARGETS += libdl.dll 8 TARGETS += libdl.dll
@@ -21,13 +21,13 @@ ifeq ($(BUILD_MSVC),yes)
21 INSTALL += lib-install 21 INSTALL += lib-install
22endif 22endif
23 23
24SOURCES := dlfcn.c 24SOURCES := src/dlfcn.c
25HEADERS := dlfcn.h 25HEADERS := src/dlfcn.h
26 26
27all: $(TARGETS) 27all: $(TARGETS)
28 28
29libdl.a: $(SOURCES) 29libdl.a: $(SOURCES)
30 $(CC) $(CFLAGS) -c $^ 30 $(CC) $(CFLAGS) -o $(^:%.c=%.o) -c $^
31 $(AR) cru $@ $(SOURCES:%.c=%.o) 31 $(AR) cru $@ $(SOURCES:%.c=%.o)
32 $(RANLIB) $@ 32 $(RANLIB) $@
33 33
@@ -58,19 +58,19 @@ lib-install:
58 58
59install: $(INSTALL) 59install: $(INSTALL)
60 60
61test.exe: test.c $(TARGETS) 61test.exe: tests/test.c $(TARGETS)
62 $(CC) $(CFLAGS) -o $@ $< libdl.dll.a 62 $(CC) $(CFLAGS) -o $@ $< libdl.dll.a
63 63
64test-static.exe: test.c $(TARGETS) 64test-static.exe: tests/test.c $(TARGETS)
65 $(CC) $(CFLAGS) -o $@ $< libdl.a 65 $(CC) $(CFLAGS) -o $@ $< libdl.a
66 66
67testdll.dll: testdll.c 67testdll.dll: tests/testdll.c
68 $(CC) $(CFLAGS) -shared -o $@ $^ 68 $(CC) $(CFLAGS) -shared -o $@ $^
69 69
70testdll2.dll: testdll2.c $(TARGETS) 70testdll2.dll: tests/testdll2.c $(TARGETS)
71 $(CC) $(CFLAGS) -shared -o $@ $< -L. -ldl 71 $(CC) $(CFLAGS) -shared -o $@ $< -L. -ldl
72 72
73testdll3.dll: testdll3.c 73testdll3.dll: tests/testdll3.c
74 $(CC) -shared -o $@ $^ 74 $(CC) -shared -o $@ $^
75 75
76test: $(TARGETS) $(TESTS) testdll.dll testdll2.dll testdll3.dll 76test: $(TARGETS) $(TESTS) testdll.dll testdll2.dll testdll3.dll
@@ -78,7 +78,7 @@ test: $(TARGETS) $(TESTS) testdll.dll testdll2.dll testdll3.dll
78 78
79clean:: 79clean::
80 rm -f \ 80 rm -f \
81 dlfcn.o \ 81 src/dlfcn.o \
82 libdl.dll libdl.a libdl.def libdl.dll.a libdl.lib libdl.exp \ 82 libdl.dll libdl.a libdl.def libdl.dll.a libdl.lib libdl.exp \
83 tmptest.c tmptest.dll \ 83 tmptest.c tmptest.dll \
84 test.exe test-static.exe testdll.dll testdll2.dll testdll3.dll 84 test.exe test-static.exe testdll.dll testdll2.dll testdll3.dll