File: Makefile.win32

package info (click to toggle)
blt8.0 2.4f-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 6,440 kB
  • ctags: 6,543
  • sloc: ansic: 57,358; tcl: 10,169; sh: 1,694; makefile: 551
file content (159 lines) | stat: -rw-r--r-- 4,454 bytes parent folder | download
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
156
157
158
159
# ------------------------------------------------------------------------
#       Makefile for demonstation shell of BLT library
# ------------------------------------------------------------------------
v1=81
v2=8.1a2

v1=80
v2=8.0

# ------------------------------------------------------------------------
#       C Compiler options 
# ------------------------------------------------------------------------

TOOLS32	     	= "c:/Program Files/DevStudio/VC"
rc32	     	= $(TOOLS32)/bin/rc.exe

DEFINES      	= -D_X86_=1 -W3 -nologo -D__STDC__ -D__WIN32__ -DCONSOLE -D_MT
CFLAGS       	= -nologo -Z7 -W3
EXTRA_CFLAGS 	= 
CC 	     	= cl.exe

# ------------------------------------------------------------------------
#       Source and target installation directories
# ------------------------------------------------------------------------

prefix	     = @prefix@
exec_prefix  = @exec_prefix@
srcdir	     = .
bindir       = @bindir@
includedir   = @includedir@
libdir	     = @libdir@

instdirs  = $(prefix) $(exec_prefix) $(bindir) $(libdir) $(includedir)

# ------------------------------------------------------------------------
#       Include directives for Tcl, Tk, and X include files 
# ------------------------------------------------------------------------

JPEGDIR		= c:/src/jpeg-6b
TCLDIR     	= c:/src/tcl$(v2)
TKDIR     	= c:/src/tk$(v2)
#TCLDIR     	= c:/src/tcl$(v2)
#TKDIR     	= c:/src/tk$(v2)
INCLUDES	= -I. -I$(srcdir) -I$(srcdir)/.. \
		-I$(TOOLS32)/include \
		-I$(TCLDIR)/win \
		-I$(TCLDIR)/generic \
		-I$(TKDIR)/win \
		-I$(TKDIR)/generic \
		-I$(TKDIR)/xlib \
		-I$(JPEGDIR)

# ------------------------------------------------------------------------
#       Libraries directives for Tcl, Tk, X11, and BLT
# ------------------------------------------------------------------------

baselibs   =	kernel32.lib user32.lib msvcrt.lib
LIBRARIES    = ./src/BLT24.lib \
		$(TKDIR)/win/tk$(v1).lib  \
		$(TCLDIR)/win/tcl$(v1).lib \
		$(baselibs)

# ------------------------------------------------------------------------
#       Don't edit anything beyond this point
# ------------------------------------------------------------------------

demo 	     = bltwish.exe
headers	     = blt.h

CC_SWITCHES  = $(CFLAGS) $(EXTRA_CFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS      = -nodefaultlib -debug -incremental:no -release -nologo -warn:3  -fixed:NO \
		-machine:IX86 -stack:2300000 -debug:full \
		-debugtype:cv 
INSTALL      = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
RANLIB 	     = @RANLIB@
SHELL 	     = bash
RM 	     = rm -f
LN_S	     = @LN_S@

subdirs	     = src src/shared demos library man 

OBJS	     = bltWinMain.o tkConsole.o
# GNU Make-specific macro
SRCS	     = $(patsubst %.o,$(srcdir)/%.c,$(OBJS)) 

all:  $(demo) 

$(demo): static $(OBJS)
	@echo "making BLT demo \"$(demo)\"..."
	$(RM) $(demo)
	link $(LDFLAGS) $(OBJS) -out:$(demo) $(LIBRARIES) 

shared:
	(cd src/shared; $(MAKE) -f Makefile.win32 CFLAGS="$(CFLAGS)" all) 
static: 
	(cd src; $(MAKE) -f Makefile.win32 CFLAGS="$(CFLAGS)" all) 

install: $(demo) mkdirs install-headers install-libs 
	$(INSTALL) -m 0755 $(demo) $(bindir)/$(demo)

mkdirs:
	@for i in $(instdirs) ; do \
	    if test ! -d $$i ; then \
		echo " mkdir $$i" ; \
		mkdir $$i ; \
	    fi ; \
        done

install-headers:
	@for i in $(headers) ; do \
	    echo "installing $(includedir)/$$i..." ; \
	    $(INSTALL_DATA) -m 0444 $(srcdir)/$$i $(includedir) ; \
	done

install-libs:
	@for i in $(subdirs) ; do \
	    (cd $$i; $(MAKE) install) ; \
	done

clean:
	$(RM) $(demo) $(OBJS)
	$(RM) *.bak *\~ "#"* *pure* .pure* *.obj bltwish.*
	@for i in $(subdirs) ; do \
	    echo "cleaning $$i..." ; \
	    (cd $$i; $(MAKE) -f Makefile.win32 clean) ; \
	done

.c.o:
	$(CC) -c $(CC_SWITCHES) -Fo$*.o $<

GENERATED_FILES = \
	config.status config.cache config.log \
	config.BLT src/bltConfig.h \
	Makefile \
	src/Makefile \
	src/TAGS \
	src/shared/Makefile \
	man/Makefile \
	library/Makefile \
	demos/*.ps

distclean: 
	@for i in $(subdirs) ; do \
	    echo "cleaning $$i..." ; \
	    (cd $$i; $(MAKE) distclean) ; \
	done
	$(RM) $(demo) *.bak *\~ "#"* *pure* .pure* *.obj
	$(RM) $(GENERATED_FILES)

PUREFLAGS=
pure: static
	$(PURIFYHOME)/purify $(PUREFLAGS) $(CC) $(CC_SWITCHES) \
		$(srcdir)/tkAppInit.c -o $(demo) ./src/libBLT.a $(LIBRARIES)

QUANTIFYFLAGS=
quant: static
	$(QUANTIFYHOME)/quantify $(QUANTIFYFLAGS) $(CC) $(CC_SWITCHES) \
		$(srcdir)/tkAppInit.c -o $(demo) ./src/libBLT.a $(LIBRARIES)