blob: d3075c894b01002f4238b3dcf01ee0c243a1d80f [file] [log] [blame]
THIS_DIR := $(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
CC = gcc
CFLAGS = -fPIC -Wall -Wextra -O2
LDFLAGS = -nostartfiles -shared -ldl
RM = rm -f
TARGET_LIB = dlopenwrap.so
SRCS = $(THIS_DIR)/dlopenwrap.c
all: ${TARGET_LIB}
$(TARGET_LIB): $(SRCS)
$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname,$@ -o $@ $^
.PHONY: clean
clean:
-${RM} ${TARGET_LIB}