summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-04 11:56:41 -0800
committerPixel <pixel@nobis-crew.org>2009-11-04 11:59:33 -0800
commitd577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch)
tree590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /Makefile
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile496
1 files changed, 496 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..82653da
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,496 @@
+SYSTEM=$(shell uname)
+ifeq ($(SYSTEM),Darwin)
+ARCH_FLAGS=-arch i386 -arch x86_64
+SHARED_FLAGS=-dynamiclib
+SHARED_EXT=dylib
+CPPFLAGS = -dynamic
+LD = g++
+else
+ARCH_FLAGS=-march=i686 -m32
+SHARED_FLAGS=-shared
+SHARED_EXT=so
+LD = g++ -m32
+endif
+CC = gcc
+CXX = g++
+STRIP = strip
+
+INCLUDES = \
+-I../Baltisot/include \
+-I../Baltisot/lib/zlib/include \
+-I../Baltisot/lib/lua/include -I../Baltisot/lib/lua/includes \
+-I /usr/include/freetype2 \
+-I /sw/include \
+-I /usr/X11/include/freetype2 -I /usr/X11/include \
+-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
+
+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 %.lua ../Baltisot/lib:../Baltisot/src
+
+IM_SOURCES = \
+old_imcolor.c \
+old_imresize.c \
+im_converttype.cpp \
+im_attrib.cpp \
+im_format.cpp \
+im_format_tga.cpp \
+im_filebuffer.cpp \
+im_bin.cpp \
+im_format_all.cpp \
+im_format_raw.cpp \
+im_binfile.cpp \
+im_format_sgi.cpp \
+im_datatype.cpp \
+im_format_pcx.cpp \
+im_colorhsi.cpp \
+im_format_bmp.cpp \
+im_image.cpp \
+im_rgb2map.cpp \
+im_colormode.cpp \
+im_format_gif.cpp \
+im_lib.cpp \
+im_format_pnm.cpp \
+im_colorutil.cpp \
+im_format_ico.cpp \
+im_palette.cpp \
+im_convertbitmap.cpp \
+im_format_led.cpp \
+im_counter.cpp \
+im_str.cpp \
+im_convertcolor.cpp \
+im_fileraw.cpp \
+im_format_krn.cpp \
+im_file.cpp \
+im_format_ras.cpp \
+old_im.cpp \
+im_sysfile_unix.cpp \
+im_arithmetic_bin.cpp \
+im_morphology_gray.cpp \
+im_quantize.cpp \
+im_arithmetic_un.cpp \
+im_geometric.cpp \
+im_render.cpp \
+im_color.cpp \
+im_histogram.cpp \
+im_resize.cpp \
+im_convolve.cpp \
+im_houghline.cpp \
+im_statistics.cpp \
+im_convolve_rank.cpp \
+im_logic.cpp \
+im_threshold.cpp \
+im_effects.cpp \
+im_morphology_bin.cpp \
+im_tonegamut.cpp \
+im_canny.cpp \
+im_distance.cpp \
+im_analyze.cpp \
+im_kernel.cpp \
+imlua.c \
+imlua_aux.c \
+imlua_convert.c \
+imlua_file.c \
+imlua_image.c \
+imlua_palette.c \
+imlua_util.c \
+imlua_process.c \
+imlua_kernel.c \
+
+IM_LIBS =
+
+CD_SOURCES = \
+cd.c \
+wd.c \
+wdhdcpy.c \
+rgb2map.c \
+cd_vectortext.c \
+cd_active.c \
+cd_attributes.c \
+cd_bitmap.c \
+cd_image.c \
+cd_primitives.c \
+cd_text.c \
+cd_util.c \
+circle.c \
+ellipse.c \
+intcgm1.c \
+intcgm2.c \
+intcgm4.c \
+intcgm6.c \
+list.c \
+sism.c \
+tparse.c \
+bparse.c \
+cddgn.c \
+cdcgm.c \
+cgm.c \
+cddxf.c \
+cdirgb.c \
+cdmf.c \
+cdps.c \
+cdpicture.c \
+cddebug.c \
+cdfontex.c \
+sim.c \
+cd_truetype.c \
+sim_other.c \
+sim_primitives.c \
+sim_linepolyfill.c \
+cd0prn.c \
+cd0emf.c \
+cd0wmf.c \
+cdx11.c \
+cdxclp.c \
+cdximg.c \
+cdxnative.c \
+cdxdbuf.c \
+xvertex.c \
+cdxrender.c \
+cdxrplus.c \
+cdlua5.c \
+cdvoid5.c \
+cdlua5ctx.c \
+cdlua5_active.c \
+cdlua5_canvas.c \
+cdluacontextplus5.c \
+cdluaim5.c \
+
+CD_LIBS =
+
+IUP_SOURCES = \
+iup_array.c \
+iup_callback.c \
+iup_dlglist.c \
+iup_attrib.c \
+iup_focus.c \
+iup_font.c \
+iup_globalattrib.c \
+iup_object.c \
+iup_key.c \
+iup_layout.c \
+iup_ledlex.c \
+iup_names.c \
+iup_open.c \
+iup_ledparse.c \
+iup_predial.c \
+iup_register.c \
+iup_scanf.c \
+iup_show.c \
+iup_str.c \
+iup_table.c \
+iup_func.c \
+iup_childtree.c \
+iup.c \
+iup_classattrib.c \
+iup_dialog.c \
+iup_assert.c \
+iup_canvas.c \
+iup_messagedlg.c \
+iup_timer.c \
+iup_image.c \
+iup_label.c \
+iup_fill.c \
+iup_zbox.c \
+iup_colordlg.c \
+iup_fontdlg.c \
+iup_filedlg.c \
+iup_strmessage.c \
+iup_menu.c \
+iup_frame.c \
+iup_user.c \
+iup_button.c \
+iup_radio.c \
+iup_toggle.c \
+iup_progressbar.c \
+iup_text.c \
+iup_val.c \
+iup_box.c \
+iup_hbox.c \
+iup_vbox.c \
+iup_cbox.c \
+iup_class.c \
+iup_classbase.c \
+iup_maskmatch.c \
+iup_mask.c \
+iup_maskparse.c \
+iup_tabs.c \
+iup_spin.c \
+iup_list.c \
+iup_getparam.c \
+iup_sbox.c \
+iup_normalizer.c \
+iup_tree.c \
+iupmot_common.c \
+iupmot_color.c \
+iupmot_focus.c \
+iupmot_font.c \
+iupmot_key.c \
+iupmot_loop.c \
+iupmot_open.c \
+iupmot_tips.c \
+iupmot_globalattrib.c \
+iupmot_dialog.c \
+iupmot_messagedlg.c \
+iupmot_timer.c \
+iupmot_image.c \
+iupmot_label.c \
+iupmot_canvas.c \
+iupmot_colordlg.c \
+iupmot_fontdlg.c \
+iupmot_filedlg.c \
+iupmot_frame.c \
+iupmot_button.c \
+iupmot_toggle.c \
+iupmot_progressbar.c \
+iupmot_clipboard.c \
+iupmot_text.c \
+iupmot_val.c \
+iupmot_tabs.c \
+iupmot_menu.c \
+iupmot_list.c \
+iupmot_tree.c \
+iupunix_help.c \
+iupunix_info.c \
+iup_array.c \
+iup_callback.c \
+iup_dlglist.c \
+iup_attrib.c \
+iup_focus.c \
+iup_font.c \
+iup_globalattrib.c \
+iup_object.c \
+iup_key.c \
+iup_layout.c \
+iup_ledlex.c \
+iup_names.c \
+iup_open.c \
+iup_ledparse.c \
+iup_predial.c \
+iup_register.c \
+iup_scanf.c \
+iup_show.c \
+iup_str.c \
+iup_table.c \
+iup_func.c \
+iup_childtree.c \
+iup.c \
+iup_classattrib.c \
+iup_dialog.c \
+iup_assert.c \
+iup_canvas.c \
+iup_messagedlg.c \
+iup_timer.c \
+iup_image.c \
+iup_label.c \
+iup_fill.c \
+iup_zbox.c \
+iup_colordlg.c \
+iup_fontdlg.c \
+iup_filedlg.c \
+iup_strmessage.c \
+iup_menu.c \
+iup_frame.c \
+iup_user.c \
+iup_button.c \
+iup_radio.c \
+iup_toggle.c \
+iup_progressbar.c \
+iup_text.c \
+iup_val.c \
+iup_box.c \
+iup_hbox.c \
+iup_vbox.c \
+iup_cbox.c \
+iup_class.c \
+iup_classbase.c \
+iup_maskmatch.c \
+iup_mask.c \
+iup_maskparse.c \
+iup_tabs.c \
+iup_spin.c \
+iup_list.c \
+iup_getparam.c \
+iup_sbox.c \
+iup_normalizer.c \
+iup_tree.c \
+iupgtk_common.c \
+iupgtk_focus.c \
+iupgtk_font.c \
+iupgtk_clipboard.c \
+iupgtk_globalattrib.c \
+iupgtk_key.c \
+iupgtk_tips.c \
+iupgtk_loop.c \
+iupgtk_open.c \
+iupgtk_messagedlg.c \
+iupgtk_dialog.c \
+iupgtk_timer.c \
+iupgtk_image.c \
+iupgtk_label.c \
+iupgtk_colordlg.c \
+iupgtk_fontdlg.c \
+iupgtk_filedlg.c \
+iupgtk_button.c \
+iupgtk_toggle.c \
+iupgtk_progressbar.c \
+iupgtk_text.c \
+iupgtk_val.c \
+iupgtk_frame.c \
+iupgtk_canvas.c \
+iupgtk_tabs.c \
+iupgtk_menu.c \
+iupgtk_list.c \
+iupgtk_tree.c \
+iupgtk_help.c \
+iupunix_info.c \
+iup_cd.c \
+iup_cdutil.c \
+iup_gauge.c \
+iup_cells.c \
+iup_colorbar.c \
+iup_controls.c \
+iup_dial.c \
+iup_oldtabs.c \
+iup_oldval.c \
+iup_oldmask.c \
+iup_colorbrowser.c \
+iup_colorhsi.c \
+iup_colorbrowserdlg.c \
+iupmat_key.c \
+iupmat_mark.c \
+iupmat_aux.c \
+iupmat_mem.c \
+iupmat_mouse.c \
+iupmat_numlc.c \
+iupmat_colres.c \
+iupmat_draw.c \
+iupmat_focus.c \
+iupmat_getset.c \
+iupmatrix.c \
+iupmat_scroll.c \
+iupmat_edit.c \
+iup_glcanvas_x.c \
+iupPPlot.cpp \
+iupPPlotInteraction.cpp \
+iup_pplot.cpp \
+iup_im.c \
+iup_image_library.c \
+ledc.c \
+iuplua.c \
+iuplua_api.c \
+il_tree_aux.c \
+il_scanf.c \
+il_getparam.c \
+il_getcolor.c \
+il_button.c \
+il_canvas.c \
+il_dialog.c \
+il_colordlg.c \
+il_clipboard.c \
+il_filedlg.c \
+il_fill.c \
+il_frame.c \
+il_hbox.c \
+il_normalizer.c \
+il_item.c \
+il_image.c \
+il_imagergb.c \
+il_imagergba.c \
+il_label.c \
+il_menu.c \
+il_multiline.c \
+il_list.c \
+il_separator.c \
+il_user.c \
+il_submenu.c \
+il_text.c \
+il_toggle.c \
+il_vbox.c \
+il_zbox.c \
+il_timer.c \
+il_sbox.c \
+il_spin.c \
+il_spinbox.c \
+il_cbox.c \
+il_messagedlg.c \
+il_radio.c \
+il_val.c \
+il_tabs.c \
+il_fontdlg.c \
+il_tree.c \
+il_progressbar.c \
+iuplua_cd.c \
+iuplua_controls.c \
+il_mask.c \
+il_matrix_aux.c \
+il_dial.c \
+il_gauge.c \
+il_colorbrowser.c \
+il_colorbar.c \
+il_matrix.c \
+il_cells.c \
+iuplua_pplot.c \
+il_pplot.c \
+iuplua_glcanvas.c \
+il_glcanvas.c \
+iuplua_im.c \
+iuplua_imglib.c \
+
+IUP_LIBS =
+
+
+WHOLE_SOURCES = \
+$(IM_SOURCES) \
+$(CD_SOURCES) \
+$(IUP_SOURCES) \
+
+MODULES_LIST = \
+luaiup.$(SHARED_EXT) \
+
+ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(WHOLE_SOURCES))))
+ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(WHOLE_SOURCES))))
+
+all: dep modules
+
+dist: modules
+ mkdir -p ../lua-interface-dist
+ 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))))
+ $(LD) $(LDFLAGS) -o $@ $+ $(IM_LIBS) $(CD_LIBS) $(IUP_LIBS)
+
+clean:
+ rm -f *.o *.dep *.so *.dylib
+
+%.dep : %.c
+ $(CC) $(CPPFLAGS_NO_ARCH) -M -MF $@ $<
+
+%.dep : %.cpp
+ $(CXX) $(CPPFLAGS_NO_ARCH) -M -MF $@ $<
+
+%.dep : %.cc
+ $(CXX) $(CPPFLAGS_NO_ARCH) -M -MF $@ $<
+
+%.c : %.clua
+ bin2c $< $@ $(basename $@)
+
+%.clua : %.lua
+ ./luac -o $@ $<
+
+-include $(ALL_DEPS)
+
+.PHONY: dist clean