summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config_lua_module32
-rw-r--r--install2
-rw-r--r--install_dev2
-rw-r--r--tecmake.mak55
-rw-r--r--tecmakewin.mak130
5 files changed, 118 insertions, 103 deletions
diff --git a/config_lua_module b/config_lua_module
index 1837ddb..4ce4220 100644
--- a/config_lua_module
+++ b/config_lua_module
@@ -14,26 +14,18 @@ echo -n Press Enter to continue or Ctrl+C to abort...
read contscr
echo ' '
-mkdir -p /usr/lib/lua/5.1
-cd /usr/lib/lua/5.1
+SYSTEM_LIB=/usr/lib
+LUA_LIB=$SYSTEM_LIB/lua/5.1
-# ln -fsv /usr/lib/libiuplua51.so iuplua.so
-# ln -fsv /usr/lib/libiupluacontrols51.so iupluacontrols.so
-# ln -fsv /usr/lib/libiupluacd51.so iupluacd.so
-# ln -fsv /usr/lib/libiupluagl51.so iupluagl.so
-# ln -fsv /usr/lib/libiuplua_pplot51.so iuplua_pplot.so
-# ln -fsv /usr/lib/libiupluaim51.so iupluaim.so
-# ln -fsv /usr/lib/libiupluaimglib51.so iupluaimglib.so
-# ln -fsv /usr/lib/libiupluatuio51.so iupluatuio.so
+Make_Lua_Link()
+{
+ ln -fsv $SYSTEM_LIB/lib$1'51'.so $1.so
+}
-# ln -fsv /usr/lib/libcdlua51.so cdlua51.so
-# ln -fsv /usr/lib/libcdluacontextplus51.so cdluacontextplus.so
-# ln -fsv /usr/lib/libcdluacairo51.so cdluacairo.so
-# ln -fsv /usr/lib/libcdluagl51.so cdluagl.so
-# ln -fsv /usr/lib/libcdluaim51.so cdluaim.so
-# ln -fsv /usr/lib/libcdluapdf51.so cdluapdf.so
+mkdir -p $LUA_LIB
+cd $LUA_LIB
-ln -fsv /usr/lib/libimlua51.so imlua.so
-ln -fsv /usr/lib/libimlua_process51.so imlua_process.so
-ln -fsv /usr/lib/libimlua_jp251.so imlua_jp2.so
-ln -fsv /usr/lib/libimlua_fftw51.so imlua_fftw.so
+Make_Lua_Link imlua
+Make_Lua_Link imlua_process
+Make_Lua_Link imlua_jp2
+Make_Lua_Link imlua_fftw
diff --git a/install b/install
index 0c6b902..ad0a5ea 100644
--- a/install
+++ b/install
@@ -95,6 +95,4 @@ Install_RunTime()
ComputeTecUname
-#Install_RunTime iup
-#Install_RunTime cd
Install_RunTime im
diff --git a/install_dev b/install_dev
index 6c2838b..ec51a10 100644
--- a/install_dev
+++ b/install_dev
@@ -97,6 +97,4 @@ Install_Dev()
ComputeTecUname
-#Install_Dev iup
-#Install_Dev cd
Install_Dev im
diff --git a/tecmake.mak b/tecmake.mak
index 2426d5b..9c4cd9b 100644
--- a/tecmake.mak
+++ b/tecmake.mak
@@ -374,6 +374,14 @@ ifndef LINKER
endif
endif
+ifndef USE_STATIC
+ NO_OVERRIDE = Yes
+endif
+ifneq ($(findstring AIX, $(TEC_UNAME)), )
+ # No dynamic libraries in AIX, so must behave as USE_STATIC
+ NO_OVERRIDE :=
+endif
+
ifdef NO_ECHO
ECHO:=@
endif
@@ -763,18 +771,23 @@ ifdef USE_IUP
ifdef USE_MOTIF
IUP_SUFFIX := mot
else
- override USE_GTK = Yes
- override USE_GDK = Yes
+ ifndef NO_OVERRIDE
+ override USE_GTK = Yes
+ endif
endif
else
ifdef USE_GTK
IUP_SUFFIX := gtk
else
- override USE_MOTIF = Yes
+ ifndef NO_OVERRIDE
+ override USE_MOTIF = Yes
+ endif
endif
endif
else
- override USE_MOTIF = Yes
+ ifndef NO_OVERRIDE
+ override USE_MOTIF = Yes
+ endif
endif
ifdef USE_STATIC
ifdef USE_CD
@@ -799,7 +812,9 @@ endif
ifdef USE_CD
CD_SUFFIX ?=
- override USE_X11 = Yes
+ ifndef NO_OVERRIDE
+ override USE_X11 = Yes
+ endif
ifndef USE_CD_OLD
ifdef GTK_DEFAULT
ifdef USE_MOTIF
@@ -844,10 +859,12 @@ ifdef USE_CD
LDIR += $(CD)/lib/$(TEC_UNAME_LIB_DIR)
ifndef USE_GTK
# Freetype is already included in GTK
- ifneq ($(findstring cygw, $(TEC_UNAME)), )
- LIBS += freetype-6
- else
- LIBS += freetype
+ ifndef NO_OVERRIDE
+ ifneq ($(findstring cygw, $(TEC_UNAME)), )
+ LIBS += freetype-6
+ else
+ LIBS += freetype
+ endif
endif
endif
endif
@@ -871,7 +888,9 @@ ifdef USE_GLUT
endif
ifdef USE_OPENGL
- override USE_X11 = Yes
+ ifndef NO_OVERRIDE
+ override USE_X11 = Yes
+ endif
ifdef USE_MOTIF
ifndef USE_IUP3
LIBS += $(MOTIFGL_LIB)
@@ -883,7 +902,9 @@ ifdef USE_OPENGL
endif
ifdef USE_MOTIF
- override USE_X11 = Yes
+ ifndef NO_OVERRIDE
+ override USE_X11 = Yes
+ endif
LIBS += Xm
LDIR += $(MOTIF_LIB)
STDINCS += $(MOTIF_INC)
@@ -905,7 +926,9 @@ ifdef USE_GTK
ifneq ($(findstring MacOS, $(TEC_UNAME)), )
# Option 1 - Fink GTK port
LDIR += $(GTK)/lib
- override USE_X11 = Yes
+ ifndef NO_OVERRIDE
+ override USE_X11 = Yes
+ endif
LIBS += gtk-x11-2.0 gdk-x11-2.0 pangox-1.0
# Option 2 - Imendio Framework
# STDINCS += /Library/Frameworks/Gtk.framework/Headers
@@ -924,7 +947,9 @@ ifdef USE_GTK
ifdef GTK_BASE
LDIR += $(GTK)/lib
endif
- override USE_X11 = Yes
+ ifndef NO_OVERRIDE
+ override USE_X11 = Yes
+ endif
LIBS += gtk-x11-2.0 gdk-x11-2.0 pangox-1.0
endif
@@ -949,7 +974,9 @@ ifdef USE_GTK
endif
ifdef USE_QT
- override USE_X11 = Yes
+ ifndef NO_OVERRIDE
+ override USE_X11 = Yes
+ endif
LIBS += QtGui QtCore
QT_BASE_INC := /usr/include/qt4
STDINCS += $(QT_BASE_INC) $(QT_BASE_INC)/QtCore $(QT_BASE_INC)/QtGui
diff --git a/tecmakewin.mak b/tecmakewin.mak
index 1be5723..a977ee5 100644
--- a/tecmakewin.mak
+++ b/tecmakewin.mak
@@ -10,7 +10,7 @@ VERSION = 4.3
#---------------------------------#
-# First target
+# First target
.PHONY: build
build: tecmake
@@ -23,7 +23,7 @@ TECMAKE = $(TECMAKE_HOME)/tecmakewin.mak
#---------------------------------#
# System Variables Definitions
-# If tecmake.bat is not used,
+# If tecmake.bat is not used,
# then at least define main system variables.
WIN32UNAMES = vc10 vc9 vc8 vc7 vc6 owc1 bc55 bc56 bc6 gcc3 gcc4 mingw3 mingw4 dllw4 dllg4 dll dll7 dll8 dll9 dll10
@@ -79,7 +79,7 @@ OBJROOT = $(PROJDIR)/obj
# ---------------------------------------------------------
# Byte Order and Word Size
-
+
ifneq ($(findstring x86, $(TEC_SYSARCH)), )
TEC_BYTEORDER = TEC_LITTLEENDIAN
else
@@ -117,7 +117,7 @@ LUAPRE = "$(TECMAKE_PATH)"/luapre.lua
#---------------------------------#
# Defaults
APPTYPE = windows
-INCLUDES =
+INCLUDES =
LIBS =
LIB =
@@ -129,7 +129,7 @@ MAKENAME = config.mak
ifdef MF
MAKENAME = $(MF).mak
-endif
+endif
###################
include $(MAKENAME)
@@ -137,7 +137,7 @@ include $(MAKENAME)
#---------------------------------#
-# Definitions of public variables
+# Definitions of public variables
ifdef LIBNAME
TARGETNAME = $(LIBNAME)
@@ -148,7 +148,7 @@ else
endif
ifndef TARGETNAME
- $(error LIBNAME nor APPNAME defined in $(MAKENAME))
+ $(error LIBNAME nor APPNAME defined in $(MAKENAME))
endif
PROJNAME ?= $(TARGETNAME)
@@ -230,10 +230,10 @@ endif
.PHONY: print-start
print-start:
@echo ''; echo 'Tecmake: Starting [ $(TARGETNAME):$(TEC_UNAME) ]'
-
-
+
+
#---------------------------------#
-# Definitions of public variables
+# Definitions of public variables
ifeq ($(MAKETYPE), APP)
TARGETROOT ?= $(PROJDIR)/bin
@@ -414,7 +414,7 @@ ifeq "$(COMPILER)" "$(VC8)"
GEN_MANIFEST ?= Yes
else
#there is no single thread RTL in VC8
- USE_MT = Yes
+ USE_MT = Yes
endif
endif
@@ -426,7 +426,7 @@ ifeq "$(COMPILER)" "$(VC9)"
GEN_MANIFEST ?= Yes
else
#there is no single thread RTL in VC9
- USE_MT = Yes
+ USE_MT = Yes
endif
ifdef VC9SDK
PLATSDK ?= $(VC9SDK)
@@ -448,7 +448,7 @@ ifeq "$(COMPILER)" "$(VC10)"
GEN_MANIFEST ?= Yes
else
#there is no single thread RTL in VC10
- USE_MT = Yes
+ USE_MT = Yes
endif
ifdef VC10SDK
PLATSDK ?= $(VC10SDK)
@@ -489,7 +489,7 @@ ifeq "$(TEC_CC)" "vc"
RCC = $(RESBIN)/rc -fo
STDINCS = $(PLATSDK)/include $(COMPILER)/include
STDFLAGS = -c -Fo$(OBJDIR)/ -W3
- STDLFLAGS =
+ STDLFLAGS =
DEPDEFS = -D_WIN32 -D_M_IX86 -D_STDCALL_SUPPORTED
STDLIBDIR = -LIBPATH:$(COMPILER)/lib$(VCLIBBIN) -LIBPATH:$(PLATSDK)/lib$(SDKLIBBIN)
OPTFLAGS := -O2
@@ -500,7 +500,7 @@ ifeq "$(TEC_CC)" "vc"
ifndef CPP_NARROW_INLINES
STDDEFS += -D_CPP_NARROW_INLINES_DEFINED
endif
- STDFLAGS += -EHsc
+ STDFLAGS += -EHsc
else # Exception Handling Model
STDFLAGS += -GX
endif
@@ -512,7 +512,7 @@ ifeq "$(TEC_CC)" "vc"
endif
ifdef DBG
STDLFLAGS += -debug
- endif
+ endif
ifdef NEW_VC_COMPILER
ifndef GEN_MANIFEST
STDLFLAGS += -MANIFEST:NO
@@ -570,11 +570,11 @@ ifeq "$(TEC_CC)" "vc"
endif
endif
endif
-
+
ifeq "$(TEC_UNAME)" "owc1"
COMPILER = $(OWC1)
TEC_CC = wc
- STDLFLAGS =
+ STDLFLAGS =
endif
ifeq "$(TEC_CC)" "wc"
@@ -729,7 +729,7 @@ ifeq "$(TEC_CC)" "gcc"
STDLFLAGS = -Wl,-subsystem,$(APPTYPE)
else
ifeq ($(MAKETYPE), DLL)
- STDLFLAGS =
+ STDLFLAGS =
else
STDLFLAGS = r
endif
@@ -770,7 +770,7 @@ system-check:
endif
endif
-
+
#---------------------------------#
# Tecgraf Libraries Location
TECTOOLS_HOME ?= ../..
@@ -835,28 +835,28 @@ endif
ifdef USE_IUP3
override USE_IUP = Yes
-# Inside Tecgraf only
+# Inside Tecgraf only
# IUP := $(IUP)3
-endif
+endif
ifdef USE_IUPBETA
IUP := $(IUP)/beta
-endif
+endif
ifdef USE_CDBETA
CD := $(CD)/beta
-endif
+endif
ifdef USE_IMBETA
IM := $(IM)/beta
-endif
+endif
ifdef USE_GLUT
override USE_OPENGL = Yes
LIBS += glut32
LDIR += $(GLUT)/lib
STDINCS += $(GLUT)/include
-endif
+endif
ifdef USE_GDK
override USE_GTK = Yes
@@ -898,20 +898,20 @@ ifdef USE_LUA
LIBS += lualib$(LUA_SUFFIX)
endif
LIBS += lua$(LUA_SUFFIX)
-
+
LUA_LIB ?= $(LUA)/lib/$(TEC_UNAME)
LDIR += $(LUA_LIB)
-
+
LUA_INC ?= $(LUA)/include
INCLUDES += $(LUA_INC)
-
+
LUA_BIN ?= $(LUA)/bin/$(TEC_SYSNAME)
BIN2C := $(LUA_BIN)/bin2c$(LUA_SUFFIX)
LUAC := $(LUA_BIN)/luac$(LUA_SUFFIX)
LUABIN := $(LUA_BIN)/lua$(LUA_SUFFIX)
endif
-ifdef USE_IUP
+ifdef USE_IUP
ifdef USE_CD
LIBS += iupcd
endif
@@ -960,11 +960,11 @@ endif
ifdef USE_OPENGL
ifdef OLD_OPENGL
- LIBS += glaux glu32 opengl32
+ LIBS += glaux glu32 opengl32
else
LIBS += glu32 opengl32
- endif
-endif
+ endif
+endif
ifdef USE_GTK
STDINCS += $(GTK)/include/atk-1.0 $(GTK)/include/gtk-2.0 $(GTK)/include/cairo $(GTK)/include/pango-1.0 $(GTK)/include/glib-2.0 $(GTK)/lib/glib-2.0/include $(GTK)/lib/gtk-2.0/include
@@ -973,7 +973,7 @@ ifdef USE_GTK
endif
LDIR += $(GTK)/lib
LIBS += gtk-win32-2.0 gdk-win32-2.0 gdk_pixbuf-2.0 pango-1.0 pangowin32-1.0 gobject-2.0 gmodule-2.0 glib-2.0
-endif
+endif
ifdef USE_QT
#STDFLAGS += -Zm200 -w34100 -w34189 -Zm200 -w34100 -w34189 -w34100 -w34189
@@ -1004,37 +1004,37 @@ ifneq ($(MAKETYPE), LIB)
LIBS += $(STDLIB)
LIBS := $(addsuffix .$(LIBEXT), $(LIBS))
- ifeq ($(TEC_CC), vc)
+ ifeq ($(TEC_CC), vc)
ifdef LDIR
LDIR := $(addprefix -LIBPATH:, $(LDIR))
endif
-
+
STDLFLAGS += $(LDIR) $(STDLIBDIR) $(LIBS)
endif
- ifeq ($(TEC_CC), bc)
+ ifeq ($(TEC_CC), bc)
ifdef LDIR
LDIR := $(addprefix -L, $(LDIR))
endif
endif
- ifeq ($(TEC_CC), wc)
+ ifeq ($(TEC_CC), wc)
ifdef LDIR
LDIR := $(addprefix LIBP , $(LDIR))
endif
-
+
LIBS := $(addprefix LIB , $(LIBS))
-
+
STDLFLAGS += $(LDIR) $(STDLIBDIR) $(LIBS)
endif
- ifeq ($(TEC_CC), gcc)
+ ifeq ($(TEC_CC), gcc)
LIBS := $(addprefix -l, $(LIBS))
LIBS := $(LIBS:.a=)
ifdef LDIR
LDIR := $(addprefix -L, $(LDIR))
endif
-
+
STDLFLAGS += $(LDIR) $(STDLIBDIR) $(LIBS)
endif
@@ -1104,30 +1104,30 @@ LIBFLAGS := $(LCFLAGS) $(STDLFLAGS) $(OBJS) $(SLIB)
ifeq ($(TEC_CC), bc)
ifeq ($(MAKETYPE), APP)
- LINKFLAGS = $(LFLAGS) $(STDLFLAGS) $(LDIR) $(STDLIBDIR) $(STARTUP) $(OBJS), $(TARGETEXE), , $(LIBS) $(SLIB),
- else
- LIBFLAGS = $(LCFLAGS) $(subst /,\\, $(STDLFLAGS) $(addprefix +,$(OBJS) $(SLIB)))
- endif
+ LINKFLAGS = $(LFLAGS) $(STDLFLAGS) $(LDIR) $(STDLIBDIR) $(STARTUP) $(OBJS), $(TARGETEXE), , $(LIBS) $(SLIB),
+ else
+ LIBFLAGS = $(LCFLAGS) $(subst /,\\, $(STDLFLAGS) $(addprefix +,$(OBJS) $(SLIB)))
+ endif
endif
-ifeq ($(TEC_CC), wc)
+ifeq ($(TEC_CC), wc)
ifeq ($(MAKETYPE), APP)
- LINKFLAGS = $(LFLAGS) $(STDLFLAGS) $(addprefix F , $(OBJS) $(SLIB))
+ LINKFLAGS = $(LFLAGS) $(STDLFLAGS) $(addprefix F , $(OBJS) $(SLIB))
else
#wlib adds files using "+" as an option
- LIBFLAGS := $(LCFLAGS) $(STDLFLAGS) $(addprefix +, $(OBJS) $(SLIB))
+ LIBFLAGS := $(LCFLAGS) $(STDLFLAGS) $(addprefix +, $(OBJS) $(SLIB))
endif
endif
-ifeq ($(TEC_CC), gcc)
+ifeq ($(TEC_CC), gcc)
ifeq ($(MAKETYPE), APP)
- LINKFLAGS = -o $(TARGETEXE) $(OBJS) $(SLIB) $(LFLAGS) $(STDLFLAGS)
+ LINKFLAGS = -o $(TARGETEXE) $(OBJS) $(SLIB) $(LFLAGS) $(STDLFLAGS)
endif
ifeq ($(MAKETYPE), DLL)
- LINKFLAGS = -shared -o $(TARGETDLL) -Wl,--out-implib=$(TARGETLIB) $(OBJS) $(DEF_FILE) $(SLIB) $(LFLAGS) $(STDLFLAGS)
+ LINKFLAGS = -shared -o $(TARGETDLL) -Wl,--out-implib=$(TARGETLIB) $(OBJS) $(DEF_FILE) $(SLIB) $(LFLAGS) $(STDLFLAGS)
endif
endif
-
+
#---------------------------------#
# Dynamic Library Build
@@ -1139,7 +1139,7 @@ $(TARGETDLL) : $(LOHS) $(OBJS) $(EXTRADEPS) $(DEF_FILE)
$(ECHO)$(LINKER) $(LINKFLAGS)
@echo ''; echo 'Tecmake: Dynamic Library ($@) Done'; echo ''
-
+
#---------------------------------#
# Static Library Build
@@ -1158,7 +1158,7 @@ $(TARGETDIR)/lib$(TARGETNAME).a : $(LOHS) $(OBJS) $(EXTRADEPS)
$(ECHO)-$(RANLIB) $@
@echo ''; echo 'Tecmake: Static Library ($@) Done'; echo ''
-
+
#---------------------------------#
# Application Build
@@ -1170,13 +1170,13 @@ $(TARGETEXE) : $(LOHS) $(OBJS) $(EXTRADEPS)
$(ECHO)$(LINKER) $(LINKFLAGS)
@echo ''; echo 'Tecmake: Application ($@) Done.'; echo ''
-
+
#---------------------------------#
# Application Scripts
# Nomes dos scripts
SRELEASE = $(SRCDIR)/$(TARGETNAME).bat
-EXEC := $(subst /,\,$(TARGETEXE))
+EXEC := $(subst /,\,$(TARGETEXE))
.PHONY: scripts
ifdef NO_SCRIPTS
@@ -1184,14 +1184,14 @@ ifdef NO_SCRIPTS
else
scripts: $(SRELEASE) ;
endif
-
+
$(SRELEASE): $(TARGETEXE)
@echo ''; echo 'Tecmake: generating script $(@F)'
@echo '@echo off' > $@
@echo 'REM Script generated automatically by tecmake v$(VERSION)' >> $@
@echo '$(EXEC) %*' >> $@
-
+
#---------------------------------#
# Directories Creation
@@ -1286,11 +1286,11 @@ addmanifest:
endif
endif
-
+
#---------------------------------#
# Dependencies
-.PHONY: depend
+.PHONY: depend
depend: $(DEPEND)
$(DEPEND): $(MAKENAME)
@@ -1313,10 +1313,10 @@ $(DEPEND): $(MAKENAME)
ifdef USE_NODEPEND
NO_DEPEND:=Yes
endif
-
+
###################
ifndef NO_DEPEND
-include $(DEPEND)
+include $(DEPEND)
endif
###################
@@ -1368,11 +1368,11 @@ clean: clean-target clean-obj
.PHONY: clean-all
clean-all: clean-extra clean-lohs clean-all-target clean-all-obj
-# Rebuild target and object files
+# Rebuild target and object files
.PHONY: rebuild
rebuild: clean-extra clean-lohs clean-obj clean-target tecmake
-# Rebuild target without rebuilding object files
+# Rebuild target without rebuilding object files
.PHONY: relink
relink: clean-target tecmake