-load luamake.so

ifdef WINDIR
# ASSUMES we have makenew and libgnumake-1.dll.a in this directory
platform_opts = -L. -lgnumake-1.dll
endif

ifeq ($(shell uname),Darwin)
platform_opts = -undefined dynamic_lookup
endif

ifeq ($(shell uname),Linux)
platform_opts = -fPIC
endif

luamake.so: luamake.c
	gcc -Wall -shared -o $@ $^ $(platform_opts) -llua5.3 -I/usr/include/lua5.3

.PHONY: test

$(lua require,luamake)

test:
	# Call module function directly
	$(info $(lua proc,hi,another hello))
	# Use eval to convert to string for display
	$(info result is $(lua eval,tostring(55)))

-load luamake.so

ifdef WINDIR
# ASSUMES we have makenew and libgnumake-1.dll.a in this directory
platform_opts = -L. -lgnumake-1.dll
endif

ifeq ($(shell uname),Darwin)
platform_opts = -undefined dynamic_lookup -I/usr/local/Cellar/lua/5.3.5_1/include/lua
endif

ifeq ($(shell uname),Linux)
platform_opts = -fPIC -I/usr/include/lua5.3
endif

luamake.so: luamake.c
	gcc -Wall -shared -o $@ $^ $(platform_opts) -llua5.3

.PHONY: test

$(lua require,luamake)

test:
	# Call module function directly
	$(info $(lua proc,hi,another hello))
	# Use eval to convert to string for display
	$(info result is $(lua eval,tostring(55)))

Fix include path for OS X homebrew
Fix include path for OS X homebrew
