1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
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
|