summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5c4295f..a1a7207 100644
--- a/Makefile
+++ b/Makefile
@@ -19,12 +19,13 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
+LDLIBS = -ldl
LDFLAGS = -Wl,--build-id=sha1
all: build-id so-build-id
build-id: test.o build-id.o
- $(CC) $(LDFLAGS) $^ -o $@
+ $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS)
so-build-id: so-test.o libbuild-id.so
$(CC) $(LDFLAGS) $^ -o $@
@@ -33,7 +34,7 @@ shared-build-id.o: build-id.c
$(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -c $^ -o $@
libbuild-id.so: shared-build-id.o
- $(CC) $(LDFLAGS) -shared $^ -o $@
+ $(CC) $(LDFLAGS) -shared $^ -o $@ $(LDLIBS)
clean:
rm -f build-id so-build-id libbuild-id.so *.o