File: linux-gcc.mk

package info (click to toggle)
tk-html3 3.0~fossil20110109-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,644 kB
  • ctags: 5,882
  • sloc: ansic: 48,994; tcl: 26,030; sh: 1,190; yacc: 161; makefile: 24
file content (130 lines) | stat: -rw-r--r-- 3,741 bytes parent folder | download | duplicates (5)
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

##### Top of the Tkhtml source tree - the directory with this file in it.
#
TOP = $(HOME)/work/tkhtml/htmlwidget

##### BUILD can be DEBUG, RELEASE or MEMDEBUG.
#
BUILD = DEBUG
# BUILD = RELEASE
# BUILD = MEMDEBUG
# BUILD = PROFILE

##### Path to hv3_polipo binary to include in starkit builds.
#
HV3_POLIPO = $(HOME)/bin/hv3_polipo

##### Version of and path to the Tcl installation to use.
#
TCLVERSION = 8.5

TCL_RELEASE  = $(HOME)/tcl
TCL_DEBUG    = $(HOME)/tcl
TCL_PROFILE  = $(HOME)/tcl_profile
#TCL_PROFILE  = $(HOME)/tcl
TCL_MEMDEBUG = $(HOME)/memtcl
TCL = $(TCL_$(BUILD))

# MKSTARKIT = ~/tcl/bin/tclkit-linux-x86-xft ~/bin/sdx.kit wrap
MKSTARKIT = ~/bin/tclkit ~/bin/sdx.kit wrap
STARKITRT = ~/bin/tclkit

##### Javascript libaries - libgc.a and libsee.a
#
JS_SHARED_LIB = libTclsee.so

JSLIB   = $(HOME)/work/tkhtml/js/lib/libgc.a
JSLIB  += $(HOME)/work/tkhtml/js/lib/libsee.a -lpthread
JSFLAGS = -I$(HOME)/work/tkhtml/js/include

#JSLIB  = $(HOME)/javascript/install_nogc/lib/libsee.a
#JSFLAGS = -I$(HOME)/javascript/install_nogc/include -DNO_HAVE_GC

##### Flags passed to the C-compiler to link to Tcl.
#
# TCLLIB_DEBUG   = -L$(TCL)/lib -ltcl$(TCLVERSION)g -ltk$(TCLVERSION)g 
TCLLIB_RELEASE  = -L$(TCL)/lib -ltcl$(TCLVERSION) -ltk$(TCLVERSION)   
TCLLIB_DEBUG    = -L$(TCL)/lib -ltcl$(TCLVERSION) -ltk$(TCLVERSION)   

TCLLIB_PROFILE  = $(TCL_PROFILE)/lib/libtcl8.5.a $(TCL_PROFILE)/lib/libtk8.5.a
TCLLIB_PROFILE  += -lX11 -lXft -lXss

TCLLIB_MEMDEBUG = $(TCLLIB_DEBUG)
TCLLIB_MEMDEBUG += $(TCL)/lib/libtclstub$(TCLVERSION).a
TCLLIB_MEMDEBUG += $(TCL)/lib/libtkstub$(TCLVERSION).a

TCLLIB = -L/usr/X11R6/lib/ -lX11 -ldl -lm $(TCLLIB_$(BUILD))

##### The C-compiler to use and the flags to pass to it.
#
CC_RELEASE  = gcc
CC_DEBUG    = gcc
CC_MEMDEBUG = $(CC_DEBUG)
CC_PROFILE  = $(CC_DEBUG)
CC = $(CC_$(BUILD))
BCC = $(CC_$(BUILD))

CFLAGS_RELEASE = -O2 -Wall -DNDEBUG -DHTML_MACROS -DTKHTML_ENABLE_PROFILE
CFLAGS_DEBUG    = -g -Wall -DHTML_DEBUG -DTKHTML_ENABLE_PROFILE
CFLAGS_PROFILE  = -g -pg -Wall -DNDEBUG -DTKHTML_ENABLE_PROFILE
CFLAGS_MEMDEBUG = -g -Wall -DRES_DEBUG -DHTML_DEBUG -DTCL_MEM_DEBUG=1
CFLAGS = $(CFLAGS_$(BUILD))

##### The name of the shared library file to build.
#
SHARED_LIB_DEBUG    = libTkhtml3g.so
SHARED_LIB_PROFILE  = libTkhtml3pg.so
SHARED_LIB_MEMDEBUG = $(SHARED_LIB_DEBUG)
SHARED_LIB_RELEASE  = libTkhtml3.so
SHARED_LIB = $(SHARED_LIB_$(BUILD))

##### Command to build a shared library from a set of object files. The
#     command executed will be:
# 
#         $(MKSHLIB) $(OBJS) -o $(SHARED_LIB)
#
MKSHLIB = $(CC) -shared
TCLSTUBSLIB_MEMDEBUG  =  "/home/dan/memtcl/lib/libtclstub8.5.a" 
TCLSTUBSLIB_MEMDEBUG += "/home/dan/memtcl/lib/libtkstub8.5.a" 

TCLSTUBSLIB = $(TCLSTUBSLIB_$(BUILD))

STRIP_RELEASE = strip
STRIP_DEBUG = true
STRIP_MEMDEBUG = $(STRIP_DEBUG)
STRIP_PROFILE = $(STRIP_DEBUG)
STRIP = $(STRIP_$(BUILD))

##### Commands to run tclsh and wish.
#
TCLSH = $(TCL)/bin/tclsh$(TCLVERSION)
WISH = $(TCL)/bin/wish$(TCLVERSION)

##### Installation directories used by the 'install' target.
#
INSTALLDIR = $(TCL)/lib/Tkhtml3.0
MANINSTALLDIR = $(TCL)/man/mann

#
# End of configuration section.
# You should not need to change anything below this line
###########################################################################

default: binaries hwish

install: binaries
	mkdir -p $(INSTALLDIR)
	mkdir -p $(MANINSTALLDIR)
	cp -f $(BINARIES) $(INSTALLDIR)

hv3-linux-x86: hv3_img.kit
	cp $(STARKITRT) starkit_runtime
	$(MKSTARKIT) hv3_img.bin -runtime ./starkit_runtime
	mv hv3_img.bin hv3-linux-x86

hv3-linux-x86.gz: hv3-linux-x86
	gzip hv3-linux-x86
	chmod 644 hv3-linux-x86.gz

###############################################################################
include $(TOP)/main.mk