From 26d609d7be69f5445f507bd12d7f0a1ee4e21ccf Mon Sep 17 00:00:00 2001 From: Alexandre Erwin Ittner Date: Sun, 11 May 2008 14:15:40 +0000 Subject: [PATCH] Makefile improvements git-svn-id: file:///var/svn/lua-iconv/trunk@44 9538949d-8f27-0410-946f-ce01ef448559 --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index bffecd5..2e1a396 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # luaiconv - Performs character set conversions in Lua -# (c) 2005-06 Alexandre Erwin Ittner +# (c) 2005-08 Alexandre Erwin Ittner # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -29,6 +29,7 @@ # Name of .pc file. "lua5.1" on Debian/Ubuntu LUAPKG = lua5.1 CFLAGS = `pkg-config $(LUAPKG) --cflags` -O3 -Wall +LFLAGS = -shared INSTALL_PATH = `pkg-config $(LUAPKG) --variable=INSTALL_CMOD` LIBS = `pkg-config $(LUAPKG) --libs` @@ -37,23 +38,26 @@ LIBS = `pkg-config $(LUAPKG) --libs` ## enviroment. #CFLAGS = -I/usr/include/lua5.1/ -O3 -Wall +#LFLAGS = -shared #LIBS = -llua5.1 #INSTALL_PATH = /usr/lib/lua/5.1 + all: iconv.so iconv.lo: luaiconv.c $(CC) -o iconv.lo -c $(CFLAGS) luaiconv.c iconv.so: iconv.lo - $(CC) -o iconv.so -shared $(LIBS) iconv.lo + $(CC) -o iconv.so $(LFLAGS) $(LIBS) iconv.lo install: iconv.so make test - install -s iconv.so $(INSTALL_PATH) + install -D -s iconv.so $(INSTALL_PATH) clean: $(RM) iconv.so iconv.lo test: iconv.so test_iconv.lua lua test_iconv.lua +