summaryrefslogtreecommitdiff
path: root/Makefile.mingw32
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.mingw32')
-rw-r--r--Makefile.mingw32120
1 files changed, 61 insertions, 59 deletions
diff --git a/Makefile.mingw32 b/Makefile.mingw32
index f46191a..6e3776a 100644
--- a/Makefile.mingw32
+++ b/Makefile.mingw32
@@ -3,18 +3,29 @@ ifeq ($(SYSTEM),Darwin)
CC = i386-mingw32-gcc
CXX = i386-mingw32-g++
LD = i386-mingw32-g++
-STRIP = i386-mingw32-strip
+STRIP = i386-mingw32-strip --strip-unneeded
+AR = i386-mingw32-ar rcs
else
ifeq ($(SYSTEM),MINGW32_NT-5.1)
CC = gcc
CXX = g++
LD = g++
-strip = strip
+strip = strip --strip-unneeded
+AR = ar rcs
+else
+ifneq ($(shell cat /etc/issue | fgrep "CentOS"), )
+CC = i686-pc-mingw32-gcc
+CXX = i686-pc-mingw32-g++
+LD = i686-pc-mingw32-g++
+STRIP = i686-pc-mingw32-strip --strip-unneeded
+AR = i686-pc-mingw32-ar rcs
else
CC = i586-mingw32msvc-gcc
CXX = i586-mingw32msvc-g++
LD = i586-mingw32msvc-g++
-STRIP = i586-mingw32msvc-strip
+STRIP = i586-mingw32msvc-strip --strip-unneeded
+AR = i586-mingw32msvc-ar rcs
+endif
endif
endif
@@ -24,22 +35,21 @@ INCLUDES = \
-I ../freetype-win32/include/freetype2 \
-I ../gnuwin32/include \
-I ../pthreads-w32-2-8-0-release/ \
+-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_MALLOC_H -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_MALLOC_H -DHAVE_BYTESWAP_H -DCD_NO_OLD_INTERFACE -DGTK_DISABLE_DEPRECATED -DIUPLUA_USELOH -DUSE_STATIC -D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0500 -DWINVER=0x0501
CPPFLAGS += $(INCLUDES) -g -DSTDC_HEADERS -DREADLINE_STATIC -DHOOK_STDS -DWORDS_LITTLEENDIAN -fexceptions -march=i686 $(HAVES)
LDFLAGS += -g -fexceptions -shared ../lua-interface/lua-interface.a -Wl,--export-dynamic -Wl,--enable-auto-image-base --export-all-symbols -Wl,--enable-auto-import \
-L ../freetype-win32/lib -L ../gnuwin32/lib
-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/win32: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/win32: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/win32: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/win32:cd/src/lua5:iup/src:iup/src/win:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcim: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/win32:cd/src/lua5:iup/src:iup/src/win:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcim: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/win32:cd/src/lua5:iup/src:iup/src/win:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcim: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 \
@@ -72,8 +82,6 @@ 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 \
@@ -142,7 +150,6 @@ cdpicture.c \
cddebug.c \
cdfontex.c \
sim.c \
-cd_truetype.c \
sim_other.c \
sim_primitives.c \
sim_linepolyfill.c \
@@ -233,37 +240,41 @@ 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 \
+iupwin_brush.c \
+iupwin_button.c \
+iupwin_canvas.c \
+iupwin_clipboard.c \
+iupwin_colordlg.c \
+iupwin_common.c \
+iupwin_dialog.c \
+iupwindows_help.c \
+iupwindows_info.c \
+iupwindows_main.c \
+iupwin_draw.c \
+iupwin_filedlg.c \
+iupwin_focus.c \
+iupwin_font.c \
+iupwin_fontdlg.c \
+iupwin_frame.c \
+iupwin_globalattrib.c \
+iupwin_handle.c \
+iupwin_image.c \
+iupwin_info.c \
+iupwin_key.c \
+iupwin_label.c \
+iupwin_list.c \
+iupwin_loop.c \
+iupwin_menu.c \
+iupwin_messagedlg.c \
+iupwin_open.c \
+iupwin_progressbar.c \
+iupwin_tabs.c \
+iupwin_text.c \
+iupwin_timer.c \
+iupwin_tips.c \
+iupwin_toggle.c \
+iupwin_tree.c \
+iupwin_val.c \
iup_array.c \
iup_callback.c \
iup_dlglist.c \
@@ -326,7 +337,6 @@ iup_getparam.c \
iup_sbox.c \
iup_normalizer.c \
iup_tree.c \
-iupunix_info.c \
iup_cd.c \
iup_cdutil.c \
iup_gauge.c \
@@ -334,9 +344,6 @@ 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 \
@@ -353,13 +360,7 @@ 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 \
@@ -413,20 +414,18 @@ 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 =
+MAIN_IUP_SOURCE = \
+plugin-luaiup.cc \
WHOLE_SOURCES = \
$(IM_SOURCES) \
$(CD_SOURCES) \
$(IUP_SOURCES) \
+$(MAIN_IUP_SOURCE) \
MODULES_LIST = \
luaiup.dll \
@@ -440,7 +439,10 @@ modules: $(MODULES_LIST)
dep: $(ALL_DEPS)
-luaiup.dll: $(addsuffix .o, $(notdir $(basename $(IM_SOURCES) $(CD_SOURCES) $(IUP_SOURCES))))
+luaiup.a: $(addsuffix .o, $(notdir $(basename $(IM_SOURCES) $(CD_SOURCES) $(IUP_SOURCES))))
+ $(AR) $@ $+
+
+luaiup.dll: plugin-luaiup.o luaiup.a
$(LD) -o $@ $+ $(IM_LIBS) $(CD_LIBS) $(IUP_LIBS) $(LDFLAGS)
clean: