--- Makefile.in
+++ Makefile.in
@@ -102,7 +102,7 @@
 
 preload: $(preload).so
 $(preload).so: $(srcdir)/$(preload).c
-	$(CC) $(CFLAGS) -o $@ -fPIC -shared $? $(LIBS)
+	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -fPIC -shared $? $(LIBS)
 
 man: $(target).1
 $(target).1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m
