PROJNAME = iup APPNAME = iuplua51 APPTYPE = CONSOLE ifdef GTK_DEFAULT ifdef USE_MOTIF # Build Motif version in Linux,Darwin,FreeBSD APPNAME = iuplua51mot endif else ifdef USE_GTK # Build GTK version in IRIX,SunOS,AIX,Win32 APPNAME = iuplua51gtk endif endif LOHDIR = loh SRCLUA = console5.lua SRC = iup_lua51.c # Disable strip STRIP = # Optimize OPT = YES # IM and IupPPlot uses C++ LINKER = $(CPPC) USE_MOTIF = Yes ifdef USE_GTK APPNAME = iuplua51gtk endif ifdef USE_MOTIF APPNAME = iuplua51mot endif DBG = Yes ifdef DBG # Statically link everything only when debugging IUP := .. USE_IUPLUA = Yes USE_IUP3 = Yes USE_STATIC = Yes USE_LUA51 = Yes ifdef DBG_DIR IUPLIB = $(IUP)/lib/$(TEC_UNAME)d CDLIB = $(CD)/lib/$(TEC_UNAME)d IMLIB = $(IM)/lib/$(TEC_UNAME)d else IUPLIB = $(IUP)/lib/$(TEC_UNAME) CDLIB = $(CD)/lib/$(TEC_UNAME) IMLIB = $(IM)/lib/$(TEC_UNAME) endif DEFINES = USE_STATIC USE_CDLUA = Yes USE_IUPCONTROLS = Yes ifneq ($(findstring Win, $(TEC_SYSNAME)), ) LIBS += iuplua_pplot$(LIBLUASUFX) iup_pplot else SLIB += $(IUPLIB)/libiuplua_pplot$(LIBLUASUFX).a $(IUPLIB)/libiup_pplot.a endif ifndef IUPLUA_NO_IM ifneq ($(findstring Win, $(TEC_SYSNAME)), ) LIBS += cdluaim$(LIBLUASUFX) else SLIB += $(CDLIB)/libcdluaim$(LIBLUASUFX).a endif endif ifneq ($(findstring Win, $(TEC_SYSNAME)), ) USE_GDIPLUS=Yes else # USE_XRENDER=Yes endif USE_IMLUA = Yes ifneq ($(findstring Win, $(TEC_SYSNAME)), ) LIBS += imlua_process$(LIBLUASUFX) iupluaim$(LIBLUASUFX) im_process iupim else SLIB += $(IMLIB)/libimlua_process$(LIBLUASUFX).a $(IUPLIB)/libiupluaim$(LIBLUASUFX).a $(IMLIB)/libim_process.a $(IUPLIB)/libiupim.a endif IUPLUA_IMGLIB = Yes ifdef IUPLUA_IMGLIB DEFINES += IUPLUA_IMGLIB ifneq ($(findstring Win, $(TEC_SYSNAME)), ) LIBS += iupluaimglib$(LIBLUASUFX) iupimglib else SLIB += $(IUPLIB)/libiupluaimglib$(LIBLUASUFX).a $(IUPLIB)/libiupimglib.a endif endif else ifneq ($(findstring Win, $(TEC_SYSNAME)), ) # Dinamically link in Windows, when not debugging # Must call "tecmake dll8" so USE_* will use the correct TEC_UNAME USE_LUA51 = Yes USE_DLL = Yes GEN_MANIFEST = No else # In UNIX Lua is always statically linked, late binding is used. # Except in Cygwin and MacOSX ifeq ($(findstring cygw, $(TEC_UNAME)), ) ifeq ($(findstring Darwin, $(TEC_UNAME)), ) USE_STATIC = Yes endif endif USE_LUA51 = Yes endif endif ifneq ($(findstring Win, $(TEC_SYSNAME)), ) SLIB += setargv.obj SRC += iuplua5.rc endif ifneq ($(findstring cygw, $(TEC_UNAME)), ) LIBS += readline history endif ifneq ($(findstring Darwin, $(TEC_UNAME)), ) LIBS += readline endif ifneq ($(findstring Linux, $(TEC_UNAME)), ) LIBS += dl #To allow late binding LFLAGS = -Wl,-E LIBS += readline history curses ncurses endif ifneq ($(findstring BSD, $(TEC_UNAME)), ) #To allow late binding LFLAGS = -Wl,-E LIBS += readline history curses ncurses endif ifneq ($(findstring SunOS, $(TEC_UNAME)), ) LIBS += dl endif ifneq ($(findstring AIX, $(TEC_UNAME)), ) FLAGS += -mminimal-toc OPTFLAGS = -mminimal-toc -ansi -pedantic LFLAGS = -Xlinker "-bbigtoc" endif