Permalink
Browse files

Adjustments to Makefile for Mac OS X

  • Loading branch information...
kurt.w.jung@gmail.com
kurt.w.jung@gmail.com committed Oct 8, 2013
1 parent 8b4b1d0 commit f6b2ca5f9a1312a7a72679c5ad23f50e97a4f51f
Showing with 23 additions and 6 deletions.
  1. +12 −4 Makefile
  2. +3 −0 Makefile.mingw
  3. +2 −1 doc/text/build.txt
  4. +5 −0 doc/text/change-log.txt
  5. +1 −1 hpdf.c
@@ -10,13 +10,21 @@ HPDFLIB=-lhpdf
HPDFINC=
LUA=lua
LUAC=luac
PLATFORM=linux
# PLATFORM=macosx
# --- End of user settings, no need to change anything below this line. ---
TARGET=hpdf.so
PACKAGE=luahpdf-1.4
PACKAGE=luahpdf-1.5
TAR=$(PACKAGE).tar.gz
ZIP=$(PACKAGE).zip
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_REPORT=otool -L ./$(TARGET)
PDF = \
demo/arc_demo.pdf \
@@ -43,11 +51,11 @@ HTML = \
doc/html/license.html
$(TARGET) : hpdf.o
cc -shared -fPIC $(STDLIB) $(LUALIB) -o $@ $^ $(LUALIB) $(HPDFLIB) -lz -lpng -lm
ldd ./$(TARGET)
$($(PLATFORM)_LINK)
$($(PLATFORM)_REPORT)
hpdf.o : hpdf.c
cc -DHPDF_SHARED $(LUAINC) $(HPDFINC) -Wall -O2 -fomit-frame-pointer -shared -fPIC -c -o $@ $<
$($(PLATFORM)_COMPILE)
dump :
cc -E -dM -ansi -DHPDF_SHARED -pedantic -Wall -O2 $(CFLAGS) $(LUAINC) $(HPDFINC) -shared hpdf.c > $@
@@ -1,3 +1,6 @@
# NOTE: This makefile has not been tested recently. If you can get it to work,
# please report changes to the issues forum for this project.
# --- Change the settings below to suit your environment ---
MINGW=/usr/i686-pc-mingw32/sys-root/mingw
@@ -14,7 +14,8 @@ library has been installed on your system. To do this, specify `./configure
--shared` when compiling it.
Examine the top portion of the included Makefile and, if needed, edit it to
suit your environment.
suit your environment. In particular, uncomment the appropriate PLATFORM
(currently, linux or macosx) and comment the other.
`PREFIX` specifies the directory that contains the lib/lua/5.2 path into which
the HPDF binding will be installed. By default, this is `/usr/local`. If your
@@ -3,6 +3,11 @@ Change log
This is a list of changes to LuaHPDF. The current version is 1.3.
Version 1.5: 2013-11-07
-----------------------
* Adjustments to Makefile for Mac OS X
Version 1.4: 2013-10-07
-----------------------
2 hpdf.c
@@ -2739,7 +2739,7 @@ static int LclPage_SetDash(lua_State *L)
else {
luaL_argcheck(L, lua_istable(L, 2), 2, "expecting dash mode table");
mode.num_ptn = luaL_checkinteger(L, 3);
if ((mode.num_ptn >= 0) && (mode.num_ptn <= 8)) {
if (mode.num_ptn <= 8) {
mode.phase = luaL_checkinteger(L, 4);
for (J = 0; J < mode.num_ptn; J++) {
int Dash;

0 comments on commit f6b2ca5

Please sign in to comment.