--- Makefile.orig 2015-03-12 16:23:05.000000000 -0700
+++ Makefile 2015-09-15 09:39:41.000000000 -0700
# --- Change the settings below to suit your environment. See explanations in
# --- the build documentation for more details. ---
-MODDIR=$(PREFIX)/lib/lua/5.2
+#MODDIR=$(PREFIX)/lib/lua/5.2
DOCDIR=$(PREFIX)/share/doc/luahpdf
-LUAINC=-I/usr/include/lua5.2
# --- End of user settings, no need to change anything below this line. ---
linux_COMPILE=cc -DHPDF_SHARED $(LUAINC) $(HPDFINC) -Wall -O2 -fomit-frame-pointer -shared -fPIC -c -o $@ $<
linux_LINK=cc -shared -fPIC -o $@ $^ $(HPDFLIB) -lz -lpng -lm
linux_REPORT=ldd ./$(TARGET)
-macosx_COMPILE=cc -DHPDF_SHARED $(LUAINC) $(HPDFINC) -DLUA_USE_MACOSX -Wall -O2 -fomit-frame-pointer -fPIC -c -o $@ $<
-macosx_LINK=cc -bundle -undefined dynamic_lookup -DLUA_USE_MACOSX $(HPDFLIB) -lz -lpng -o hpdf.so hpdf.o
+macosx_COMPILE=$(CC) $(CFLAGS) -DHPDF_SHARED $(LUAINC) $(HPDFINC) -DLUA_USE_MACOSX -Wall -fomit-frame-pointer -fPIC -c -o $@ $<
+macosx_LINK=$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup -DLUA_USE_MACOSX $(HPDFLIB) -lz -lpng -o hpdf.so hpdf.o
macosx_REPORT=otool -L ./$(TARGET)
- cc -E -dM -ansi -DHPDF_SHARED -pedantic -Wall -O2 $(CFLAGS) $(LUAINC) $(HPDFINC) -shared hpdf.c > $@
+ $(CC) -E -dM -ansi -DHPDF_SHARED -pedantic -Wall -O2 $(CFLAGS) $(LUAINC) $(HPDFINC) -shared hpdf.c > $@
$(LUA) -e "package.path=[[]] package.cpath=[[./?.so;./?.dll]] local hpdf = require [[hpdf]] print(hpdf.VERSION_TEXT)"
install -m 0755 -d "$(DESTDIR)$(DOCDIR)"
install -m 0755 -d "$(DESTDIR)$(DOCDIR)/text"
install -m 0755 -d "$(DESTDIR)$(DOCDIR)/html"
- install -m 0644 README doc/*.lua "$(DESTDIR)$(DOCDIR)"
+ install -m 0644 README.md doc/*.lua "$(DESTDIR)$(DOCDIR)"
install -m 0644 doc/text/*.txt "$(DESTDIR)$(DOCDIR)/text"
install -m 0644 doc/html/*.html doc/html/*.css doc/html/*.png "$(DESTDIR)$(DOCDIR)/html"