OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.1 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../lua-posix/makefile.patch
  5. # Copyright (C) 2006 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This patch file is dual-licensed. It is available under the license the
  11. # patched project is licensed under, as long as it is an OpenSource license
  12. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  13. # of the GNU General Public License as published by the Free Software
  14. # Foundation; either version 2 of the License, or (at your option) any later
  15. # version.
  16. # --- SDE-COPYRIGHT-NOTE-END ---
  17. --- posix/Makefile 2003-11-06 01:26:49.000000000 +0100
  18. +++ posix-5.1-alpha/Makefile 2005-09-04 14:17:03.000000000 +0200
  19. @@ -1,10 +1,20 @@
  20. # makefile for POSIX library for Lua
  21. # change these to reflect your Lua installation
  22. -LUA= /tmp/lhf/lua-5.0
  23. -LUAINC= $(LUA)/include
  24. -LUALIB= $(LUA)/lib
  25. -LUABIN= $(LUA)/bin
  26. +LUA= lua
  27. +
  28. +LUAINC= $(LUA_ROOT)/include
  29. +LUALIB= $(LUA_ROOT)/lib
  30. +LUABIN= $(LUA_ROOT)/bin
  31. +
  32. +# installation path
  33. +LUA_ROOT= $(shell pkg-config --variable prefix lua)
  34. +LUA_CDIR= $(shell pkg-config --variable INSTALL_CMOD lua)
  35. +LUA_LDIR= $(shell pkg-config --variable INSTALL_LMOD lua)
  36. +
  37. +INSTALL = install
  38. +INSTALL_DATA = $(INSTALL) -m 644
  39. +INSTALL_EXEC = $(INSTALL) -m 755
  40. # no need to change anything below here
  41. CFLAGS= -fPIC $(INCS) $(WARN) -O2 $G
  42. @@ -16,23 +26,25 @@
  43. OBJS= $(MYLIB).o
  44. -T= $(MYLIB).so
  45. +all: $(MYLIB).so
  46. -all: test
  47. +test: $(MYLIB).so
  48. + $(LUA) -l$(MYNAME) test.lua
  49. -test: $T
  50. - $(LUABIN)/lua -l$(MYNAME) test.lua
  51. +$(MYLIB).so: $(OBJS)
  52. + $(CC) $(LDFLAGS) -o $@ -shared $(OBJS)
  53. -$T: $(OBJS)
  54. - $(CC) -o $@ -shared $(OBJS)
  55. +install:
  56. + $(INSTALL_EXEC) $(MYLIB).so $(LUA_CDIR)/
  57. + $(INSTALL_DATA) $(MYNAME).lua $(LUA_LDIR)/
  58. $(OBJS): modemuncher.c
  59. -tree: $T
  60. +tree: $(MYLIB).so
  61. $(LUABIN)/lua -l$(MYNAME) tree.lua .
  62. clean:
  63. - rm -f $(OBJS) $T core core.* a.out
  64. + rm -f $(OBJS) $(MYLIB).so core core.* a.out
  65. x:
  66. @echo "$(MYNAME) library:"