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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422
|
#===============================================================
# V Makefile - Version 1.20 - 6/30/98
#
# Copyright (C) 1995,1996,1997,1998 Bruce E. Wampler
#
# This file is part of the V C++ GUI Framework, and is covered
# under the terms of the GNU Library General Public License,
# Version 2. This library has NO WARRANTY. See the source file
# vapp.cxx for more complete information about license terms.
#
# Many thanks to Jan Broeckhove for contributing this
# set of makefiles, which are the standard method of building
# V beginning with Version 1.16.
#===============================================================
#
# IMPORTANT NOTE:
# This Makefile is the top level makefile used to build V on
# various Unix-like platforms. First and foremost, this Makefile
# requires a version of make compatible with Gnu make. One
# specific requirement is VPATH support, for example. There
# are other incompatibilities with gmake and the old standard
# Unix make.
#
# Also, all the Makefiles in this version are controlled by
# the file Config.mk. It defines various directory locations
# and things needed to make V work correctly. You should only
# have to edit Config.mk to get V compiled correctly.
#
# There are TWO versions of Config.mk - one for the standard
# Athena widget version of V, and one for the Motif version.
# To build the Athena version, copy ConfigX.mk to Config.mk
# and edit for your system. To build the Motif version,
# copy ConfigM.mk to Config.mk and edit for your system.
#
CONFIG = ./Config.mk
include $(CONFIG)
#===============================================================
# Available targets:
#
# all (default): vlib, vtest, utils, examp ...
# vlib: build V library
# vtest: build exhaustive test program v1
# utils: vgen, viconed, vdraw, vtexted, bmp2vbm
# examples: demos proto, drawex, tutor, icondemo
# clean: general cleanup
# cleanmotif: cleanup motif .o's, etc.
# cleanobj: cleanup .o's
# cleanbin: cleanup bins's
# cleanall: cleanup all non-source stuff
# tar: X and Windows Distribution
# tarwin: Windows only Distribution"
# tarx: X only distribution
# tarfull: everthing, including .o's, etc.
# getwin: copy MS-Windows source from /dosc
# permissions: make sources readable to world
# installv: run as root to install to /usr/local/v
# installvlinux: run as root to install to /usr/local
# installunm: install to ../pubv (UNM specific)
#
#===============================================================
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# composite targets and targets for builds in subdirs
# (with some in-between targets to map target to directory)
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SRCEXTS = *.cpp *.cxx *.c *.h Make* make* Config* *.tex *.txt
.PHONY: default all vlib vtest utils examples testlib
.PHONY: srcx test appgen iconed draw texted vide bmp2vbm tutor examp drawex icons
default: all
all: vlib vtest utils examples
@echo "Library, test, utils, examples and tutorial made"
vlib: srcx
vtest: test
testlib:
-rm bin/linux/v1
cd srcx ; $(MAKE)
cd test ; $(MAKE)
utils: appgen iconed draw texted bmp2vbm vide
examples: examp drawex icons tutor
srcx test appgen iconed draw texted vide bmp2vbm tutor examp drawex icons:
cd $@ ; $(MAKE)
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# Platform specific MAKES
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.PHONY: linux linuxelf sun4 sgi hpux aix solaris bsd
linux linuxelf sun4 sgi hpux aix solaris bsd:
$(MAKE) ARCH=$@ vlib
$(MAKE) ARCH=$@ vtest
(cd appgen ; $(MAKE) ARCH=$@)
(cd iconed ; $(MAKE) ARCH=$@)
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# targets for cleaning up
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.PHONY: clean
clean:
-rm -f $(CLEANEXTS) *.bkh v.tgz
for i in srcx appgen doc draw drawex examp iconed icons \
srcx test texted vide tutor; do \
(cd $$i; $(MAKE) clean); \
done
for i in contrib vopengl includex/v includew/v srcwin; do \
(cd $$i; rm -f $(CLEANEXTS)); \
done
-rm -f bccide/*.bak bccide/*.tmp bccide/*.csm
-rm -f bccide/*.dsw bccide/*.obr bccide/*.tr
-rm -f watcom/*.bak watcom/*.tmp watcom/*/*.exe watcom/*/*.obj
-rm -f watcom/*/*.map watcom/*/*.lib watcom/*/*.err watcom/*/*.sym
-rm -f bccide/*.bak bccide/*.tmp bccide/*.\~* bccide/*.csm
.PHONY: cleanmotif
cleanmotif:
-rm -f objm/*/* lib/*/libVm.a bin/*/v1m
for i in linuxelf linux mips sgi hpux solaris aix sun4 bsd; do \
date > objm/$$i/ThisIs;\
done
.PHONY: cleantestlib
cleantestlib:
for i in linuxelf linux mips sgi hpux solaris aix sun4 winbsd ; do \
-rm bin/$$i/v1 ; \
done
.PHONY: cleanbin
cleanbin:
-rm -f bin/*/*
for i in linuxelf linux mips sgi hpux solaris aix bsd sun4 win mingw32; do \
date > lib/$$i/ThisIs; date > bin/$$i/ThisIs ; \
done
.PHONY: cleanobj
cleanobj:
-rm -f obj/*/* objm/*/*
-rm -f watcom/*/*.obj
for i in linuxelf linux mips sgi hpux solaris aix bsd sun4 win16 win32 win32db mingw32; do \
date > obj/$$i/ThisIs; \
done
for i in linuxelf linux mips sgi hpux solaris bsd aix sun4; do \
date > objm/$$i/ThisIs; \
done
.PHONY: cleanall
cleanall: clean cleanobj
-rm -f lib/*/* bin/*/*
for i in linuxelf linux mips sgi hpux solaris aix bsd sun4 win mingw32; do \
date > lib/$$i/ThisIs; date > bin/$$i/ThisIs ; \
done
.PHONY: cleanlf
cleanlf:
for i in srcx appgen doc draw drawex examp iconed icons \
test texted vide tutor; do \
(cd $$i; rm -f $(CLEANEXTS); dos2unix $(SRCEXTS) ); \
done
for i in contrib vopengl includex/v includew/v srcwin; do \
(cd $$i; rm -f $(CLEANEXTS); dos2unix $(SRCEXTS) ); \
done
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# targets for making tar files
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.PHONY: tar
tar: clean
@echo "Making v.tgz - X and Windows Distribution"
@echo " Cleaning up old tar file"
-rm ../v-$(VV).tar$(TARZ)
cd .. ; tar cvf$(TARZ) v-$(VV).tar$(TARZ) v/Make* v/README v/C* v/P* \
v/doc/* v/examp/* v/bmp2vbm/* v/tutor/* v/include v/includex/* \
v/includew/* v/lib/*/ThisIs v/obj/*/ThisIs v/objm/*/ThisIs v/srcx/* \
v/srcwin/* v/test/* v/draw/* v/iconed/* v/drawex/* v/bin/*/ThisIs \
v/instwin.txt v/bccide v/icons/* v/watcom/* v/contrib/* v/appgen/* \
v/texted/* v/vide/* v/vopengl/* v/msvc/* v/mingw32/* v/rdmewin.txt; cd v
.PHONY: tarwin
tarwin: clean
@echo "Making vwin.tar - Windows Distribution"
@echo " Cleaning up old tar file"
-rm ../vwin$(VVW).tar$(TARZ)
cd .. ; tar cvf$(TARZ) vwin$(VVW).tar$(TARZ) v/Make* v/README v/C* v/P* \
v/doc/* v/examp/* v/bmp2vbm/* v/tutor/* v/include \
v/includew/* v/lib/*/ThisIs v/lib/win/* v/obj/*/ThisIs v/objm/*/ThisIs \
v/srcwin/* v/test/* v/draw/* v/drawex/* v/bin/*/ThisIs \
v/instwin.txt v/bccide v/icons/* v/iconed/* v/contrib/* \
v/appgen/* v/texted/* v/vide/* v/vopengl/* v/msvc/* v/mingw32/* v/rdmewin.txt ; cd v
.PHONY: tarx
tarx: clean
@echo "Making vx-$(VV).tar - X only distribution"
@echo " Cleaning up old tar file"
-rm ../vx-$(VV).tar$(TARZ)
cd .. ; tar cvf$(TARZ) vx-$(VV).tar$(TARZ) v/Make* v/README v/C* v/P* \
v/doc/* v/examp/* v/bmp2vbm/* v/tutor/* v/include v/includex/* \
v/lib/*/ThisIs v/obj/*/ThisIs v/objm/*/ThisIs v/srcx/* v/icons/* \
v/test/* v/draw/* v/iconed/* v/drawex/* v/bin/*/ThisIs \
v/contrib/* v/appgen/* v/texted/* v/vide/* v/vopengl/* ; cd v
.PHONY: tarxsrc
tarxsrc: clean
@echo "Making vxsrc-$(VV).tar - X only distribution"
@echo " Cleaning up old tar file"
-rm ../vxsrc-$(VV).tar$(TARZ)
cd .. ; tar cvf$(TARZ) vxsrc-$(VV).tar$(TARZ) v/Make* v/README v/C* v/P* \
v/examp/* v/bmp2vbm/* v/tutor/* v/include v/includex/* \
v/lib/*/ThisIs v/obj/*/ThisIs v/objm/*/ThisIs v/srcx/* v/icons/* \
v/test/* v/draw/* v/iconed/* v/drawex/* v/bin/*/ThisIs \
v/contrib/* v/appgen/* v/texted/* v/vide/* v/vopengl/* ; cd v
.PHONY: tarfull
tarfull: clean
@echo "Making vfull.tgz - FULL VERSION"
@echo " Cleaning up old tar file"
-rm ../vfull.tar$(TARZ)
cd .. ; tar cvf$(TARZ) vfull.tar$(TARZ) v/* ; cd v
.PHONY: tarxdemo
tarxdemo:
-rm ../vdemox-$(VV).tar$(TARZ)
-cp bin/linux/vdraw vdraw.linux.bin
tar cvf$(TARZ) vdemox-$(VV).tar$(TARZ) vdraw.linux.bin
mv vdemox-$(VV).tar$(TARZ) ..
-rm vdraw.linux.bin
.PHONY: tardemo
tardemo:
-rm ../vdemos-$(VV).tar$(TARZ)
-cp bin/linux/vdraw vdraw.linux.bin
-cp bin/win/vdraw.exe vdraw.exe
tar cvf$(TARZ) vdemos-$(VV).tar$(TARZ) vdraw.exe vdraw.linux.bin
mv vdemos-$(VV).tar$(TARZ) ..
-rm vdraw.linux.bin
-rm vdraw.exe
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# target for fixing permissions
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PERMDIRS = . doc examp tutor includex includex/v includew/v lib \
lib/* obj obj/* objm objm/* srcx srcwin test draw drawex iconed bin \
bin/* bmp2vbm icons vopengl texted vide appgen contrib bccide watcom msvc mingw32
WINDIRS = watcom/win16 watcom/win16db watcom/win32 watcom/win32db \
msvc/vgen32 msvc/viconed msvc/vmsvc32 msvc/vtstms32 \
msvc/vgen32/release msvc/viconed/release msvc/vmsvc32/release \
msvc/vtstms32/release
PERMFILES = Make* README P* C* instwin.txt rdmewin.txt doc/* includex/v/* \
includew/v/* lib/*/* obj/*/* objm/*/* srcx/* srcwin/* test/* \
draw/* iconed/* drawex/* examp/* bin/*/* tutor/* bmp2vbm/* bccide/* \
icons/* watcom/*/* watcom/* contrib/* \
appgen/* texted/* vide/* vopengl/* mingw32/* msvc/*/* msvc/*
EXEFILES = bin/*/*
.PHONY: permissions
permissions:
-chmod 755 $(PERMDIRS)
-chmod 755 $(WINDIRS)
-chmod 644 $(PERMFILES)
-chmod 755 $(PERMDIRS)
-chmod 755 $(WINDIRS)
-chmod 755 $(EXEFILES)
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# installation targets
# These work best for dedicated systems where you can run as
# root.
# IMPORTANT! It will be easier if you make a symbolic link
# in the home directory of root to whereever V is before
# doing the install. E.g.,
#
# [root]# cd
# [root]# ln -s /home/bruce/v v
# [root]# cd v
# [root]# make installLinux
#
# This makefile uses $(LibDir), which is
# set to HOME by default, so adding a link from the root
# directory of root to the real v directory makes this work right.
#
# The Linux version assumes that X11 binaries are at /usr/X11/bin.
# Some versions have /usr/X11R6/bin instead. If that is your case,
# you should also create a symbolic link in /usr: ln -s X11R6 X11
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.PHONY: installLinux
installLinux:
$(MAKE) ARCH=linux installVLinux
.PHONY: uninstallLinux
uninstallLinux:
$(MAKE) ARCH=linux uninstallVLinux
.PHONY: uninstallLinuxElf
uninstallLinuxElf:
$(MAKE) ARCH=linuxelf uninstallVLinux
.PHONY: installLinuxElf
installLinuxElf:
$(MAKE) ARCH=linuxelf installVLinux
.PHONY: installv
installv:
-mkdir /usr/local/v
-mkdir /usr/local/v/lib
-mkdir /usr/local/v/bin
-mkdir /usr/local/v/include
-mkdir /usr/local/v/include/v
-chmod 755 /usr/local/v
-chmod 755 /usr/local/v/lib
-chmod 755 /usr/local/v/bin
-chmod 755 /usr/local/v/include
-chmod 755 /usr/local/v/include/v
cp includex/v/* /usr/local/v/include/v
cp $(LibDir)/*.a /usr/local/v/lib
cp $(Bin)/* /usr/local/v/bin
-chmod 644 /usr/local/v/include/v/*
-chmod 644 /usr/local/v/lib/*
-chmod 755 /usr/local/v/bin/*
.PHONY: installmingw32
installmingw32:
cp includew/v/* $(HOMEMW)/include/v
cp $(LibDir)/*.a $(HOMEMW)/lib
cp $(Bin)/* $(HOMEMW)/bin
.PHONY: instalVlLinux
installVLinux:
@echo "You must run this as root"
-mkdir $(DESTDIR)/usr/include/v
-chmod 644 includex/v/*
cp includex/v/* $(DESTDIR)/usr/include/v
ifeq ($(Arch),linuxelf)
chmod 644 $(LibDir)/*.so.$(VV)
cp $(LibDir)/*.so.$(VV) $(DESTDIR)/usr/lib
else
-chmod 644 $(LibDir)/*.a
cp $(LibDir)/*.a $(DESTDIR)/usr/lib
endif
-chmod 755 $(Bin)/*
cp $(Bin)/* $(DESTDIR)/usr/bin
.PHONY: uninstalVlLinux
uninstallVLinux:
@echo "You must run this as root"
-rm /usr/include/v/*
ifeq ($(Arch),linuxelf)
rm -f /usr/lib/$(LIBNAME).so.1
rm -f /usr/lib/$(LIBNAME).so
rm -f /usr/lib/$(LIBNAME).so.$(VV)
else
rm -f /usr/lib/libV.a
endif
-rm /usr/X11/bin/viconed
-rm /usr/X11/bin/b2v
-rm /usr/X11/bin/icondemo
-rm /usr/X11/bin/proto
-rm /usr/X11/bin/tutapp
-rm /usr/X11/bin/v1
-rm /usr/X11/bin/vdraw
-rm /usr/X11/bin/vdrawex
-rm /usr/X11/bin/ved
-rm /usr/X11/bin/vgen
# To install V to /usr/local hierarchy at UNM
# The strategy I used at UNM, where I don't have access to
# the system as root was to get symbolic links on all the local
# architectures to ~wampler/pubv/xxx for each architecture.
# I then make the files on my private directory, and them
# copy them to the /pubv directory for public consumption.
# This scheme allows you to add whatever you need, such
# as /usr/local/v/doc, or whatever.
.PHONY: installunm
installunm:
cp includex/v/* ../pubv/irix/include/v
-chmod 644 ../pubv/irix/include/v/*
cp includex/v/* ../pubv/sunos/include/v
-chmod 644 ../pubv/sunos/include/v/*
cp lib/sgi/* ../pubv/irix/lib
-chmod 644 ../pubv/irix/lib/*
cp lib/sun4/* ../pubv/sunos/lib
ranlib ../pubv/sunos/lib/libV.a
-chmod 644 ../pubv/sunos/lib/*
cp bin/sgi/* ../pubv/irix/bin
-chmod 755 ../pubv/irix/bin/*
cp bin/sun4/* ../pubv/sunos/bin
-chmod 755 ../pubv/sunos/bin/*
|