diff options
-rw-r--r-- | Makefile | 32 | ||||
-rw-r--r-- | src/plugin-luaiup.cc | 6 |
2 files changed, 15 insertions, 23 deletions
@@ -13,7 +13,8 @@ LD = g++ -m32 endif CC = gcc CXX = g++ -STRIP = strip +STRIP = strip --strip-unneeded +AR = ar rcs INCLUDES = \ -I../Baltisot/include \ @@ -25,16 +26,16 @@ INCLUDES = \ -I /usr/include/gtk-2.0 -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -I /usr/include/cairo -I /usr/include/pango-1.0 -I /usr/lib/gtk-2.0/include -I /usr/include/atk-1.0 \ -I im/include -I cd/include -I cd/src/sim -I cd/src/x11 -I iup/include -I iup/src -I iup/srccontrols \ -HAVES = -DHAVE_VSSCANF -DHAVE_LIBJPEG -DHAVE_FCNTL -DHAVE_UNISTD_H -DHAVE_FORK -DHAVE_PIPE -DHAVE_FSYNC -DHAVE_MALLOC_H -DHAVE_ASPRINTF -DHAVE_BYTESWAP_H -DCD_NO_OLD_INTERFACE -DGTK_DISABLE_DEPRECATED -D_IUP_PPLOT_ -DIUPLUA_USELOH -DUSE_STATIC -DIUPLUA_IMGLIB +HAVES = -DHAVE_VSSCANF -DHAVE_LIBJPEG -DHAVE_FCNTL -DHAVE_UNISTD_H -DHAVE_FORK -DHAVE_PIPE -DHAVE_FSYNC -DHAVE_MALLOC_H -DHAVE_ASPRINTF -DHAVE_BYTESWAP_H -DCD_NO_OLD_INTERFACE -DGTK_DISABLE_DEPRECATED -DIUPLUA_USELOH -DUSE_STATIC CPPFLAGS_NO_ARCH += $(INCLUDES) -O4 -fexceptions -DSTDC_HEADERS -DREADLINE_STATIC -DHOOK_STDS -DWORDS_LITTLEENDIAN $(HAVES) -DTEC_LITTLEENDIAN CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) LDFLAGS += $(ARCH_FLAGS) $(SHARED_FLAGS) -L/usr/X11/lib -L/sw/lib ./lua-interface.$(SHARED_EXT) -vpath %.c ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/x11:cd/src/xrender:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcgl:iup/srcpplot:iup/srcim:iup/srcimglib:iup/srcledc:iup/srclua5 -vpath %.cc ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/x11:cd/src/xrender:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcgl:iup/srcpplot:iup/srcim:iup/srcimglib:iup/srcledc:iup/srclua5 -vpath %.cpp ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/x11:cd/src/xrender:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcgl:iup/srcpplot:iup/srcim:iup/srcimglib:iup/srcledc:iup/srclua5 +vpath %.c ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/x11:cd/src/xrender:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcim:iup/srcledc:iup/srclua5 +vpath %.cc ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/x11:cd/src/xrender:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcim:iup/srcledc:iup/srclua5 +vpath %.cpp ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/x11:cd/src/xrender:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcim:iup/srcledc:iup/srclua5 vpath %.lua ../Baltisot/lib:../Baltisot/src IM_SOURCES = \ @@ -286,14 +287,7 @@ iupmat_getset.c \ iupmatrix.c \ iupmat_scroll.c \ iupmat_edit.c \ -iupPPlot.cpp \ -iupPPlotInteraction.cpp \ -iup_pplot.cpp \ iup_im.c \ -iup_image_library.c \ -ledc.c \ -lex.yy.c \ -y.tab.c \ iuplua.c \ iuplua_api.c \ il_tree_aux.c \ @@ -347,10 +341,9 @@ il_colorbrowser.c \ il_colorbar.c \ il_matrix.c \ il_cells.c \ -iuplua_pplot.c \ -il_pplot.c \ iuplua_im.c \ -iuplua_imglib.c \ + +MAIN_IUP_SOURCE = \ plugin-luaiup.cc \ IUP_LIBS = -lXm -lXpm -lXmu -lXt -lXext -lX11 -lm @@ -359,6 +352,7 @@ WHOLE_SOURCES = \ $(IM_SOURCES) \ $(CD_SOURCES) \ $(IUP_SOURCES) \ +$(MAIN_IUP_SOURCE) MODULES_LIST = \ luaiup.$(SHARED_EXT) \ @@ -370,17 +364,21 @@ all: dep modules dist: modules mkdir -p ../lua-interface-dist + $(STRIP) $(MODULES_LIST) cp $(MODULES_LIST) ../lua-interface-dist modules: $(MODULES_LIST) dep: $(ALL_DEPS) -luaiup.$(SHARED_EXT): $(addsuffix .o, $(notdir $(basename $(IM_SOURCES) $(CD_SOURCES) $(IUP_SOURCES)))) +luaiup.a: $(addsuffix .o, $(notdir $(basename $(IM_SOURCES) $(CD_SOURCES) $(IUP_SOURCES)))) + $(AR) $@ $+ + +luaiup.$(SHARED_EXT): plugin-luaiup.o luaiup.a $(LD) $(LDFLAGS) -o $@ $+ $(IM_LIBS) $(CD_LIBS) $(IUP_LIBS) clean: - rm -f *.o *.dep *.so *.dylib + rm -f *.o *.dep *.so *.dylib *.a %.dep : %.c $(CC) $(CPPFLAGS_NO_ARCH) -M -MF $@ $< diff --git a/src/plugin-luaiup.cc b/src/plugin-luaiup.cc index e989d47..6c9b13d 100644 --- a/src/plugin-luaiup.cc +++ b/src/plugin-luaiup.cc @@ -21,19 +21,13 @@ #define WEAK #endif -extern "C" { -int luaopen_iupluaimglib(lua_State* L); -} - static void _init_plugin(Lua * L) { static bool done = false; if (done) return; done = true; L->wrap_open(iuplua_open); L->wrap_open(iupkey_open); - L->wrap_open(luaopen_iupluaimglib); L->wrap_open(iupcontrolslua_open); - L->wrap_open(iup_pplotlua_open); L->wrap_open(cdlua_open); L->wrap_open(cdluaiup_open); L->wrap_open(iupimlua_open); |