Important changes were performed to clean up the makefiles, these will be detailed later in a document (the work is not completely finished).
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 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763
diff --git a/config/ansi/Makefile b/config/ansi/Makefile
index 07db192..bd39e4f 100644
--- a/config/ansi/Makefile
+++ b/config/ansi/Makefile
@@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
-#* SEP Directory separator for the current platform.
-#* Either / or \ (maybe : on Macs)
-#*
+#* SEP Directory separator used during compilation.
+#* (usually "/" or "\"). Note that on Win32, both gcc
+#* and Visual C++ use "/" as a directory separator !!
+#*
+#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
+#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@@ -82,12 +85,23 @@ endif
DELETE := rm -f
SEP := /
+HOSTSEP := $(SEP)
BUILD := $(TOP)/config/ansi
PLATFORM := ansi
# the directory where all object files are placed
#
-OBJ_DIR := $(TOP)/obj
+# Note that this is not $(TOP)/obj !!
+# This lets you build the library in your own directory
+# with something like :
+#
+# set TOP=....../path/to/freetype2/top/dir...
+# mkdir obj
+# make -f %TOP%/Makefile setup [options]
+# make -f %TOP%/Makefile
+#
+#
+OBJ_DIR := obj
# the directory where all library files are placed
@@ -155,11 +169,18 @@ ifndef CFLAGS
CFLAGS := -c
endif
+# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
+# nothing (if it already is by default like LCC).
+#
+ANSIFLAGS :=
+
# Now include the main sub-makefile. It contains all the rules used
# to build the library with the previous variables defined
#
include $(TOP)/config/freetype.mk
+clean_freetype: clean_freetype_std
+distclean_freetype: clean_freetype_library_std
# Librarian to use to build the static library
#
diff --git a/config/detect.mk b/config/detect.mk
index 0dcc7c9..bef9942 100644
--- a/config/detect.mk
+++ b/config/detect.mk
@@ -123,5 +123,5 @@ dos_setup:
@echo ÿ
@echo Otherwise, simple type 'make' again to build the library
@echo ÿ
- @$(COPY) $(CONFIG_RULES) $(CONFIG_MK) > nul
+ @$(COPY) $(subst /,\,$(CONFIG_RULES) $(CONFIG_MK)) > nul
diff --git a/config/dos/MAKEFILE.GCC b/config/dos/MAKEFILE.GCC
index a7642cb..6d60938 100644
--- a/config/dos/MAKEFILE.GCC
+++ b/config/dos/MAKEFILE.GCC
@@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
-#* SEP Directory separator for the current platform.
-#* Either / or \ (maybe : on Macs)
-#*
+#* SEP Directory separator used during compilation.
+#* (usually "/" or "\"). Note that on Win32, both gcc
+#* and Visual C++ use "/" as a directory separator !!
+#*
+#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
+#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@@ -82,12 +85,23 @@ endif
DELETE := rm -f
SEP := /
+HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/dos
PLATFORM := dos
# the directory where all object files are placed
#
-OBJ_DIR := $(TOP)/obj
+# Note that this is not $(TOP)/obj !!
+# This lets you build the library in your own directory
+# with something like :
+#
+# set TOP=....../path/to/freetype2/top/dir...
+# mkdir obj
+# make -f %TOP%/Makefile setup [options]
+# make -f %TOP%/Makefile
+#
+#
+OBJ_DIR := obj
# the directory where all library files are placed
@@ -154,10 +168,18 @@ ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall
endif
+# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
+# nothing (if it already is by default like LCC).
+#
+ANSIFLAGS := -ansi -pedantic
+
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
+clean_freetype: clean_freetype_dos
+distclean_freetype: distclean_freetype_dos
+
# This final rule is used to link all object files into a single
# library. It is part of the system-specific sub-Makefile because not
diff --git a/config/freetype.mk b/config/freetype.mk
index 711e0ae..93764b2 100644
--- a/config/freetype.mk
+++ b/config/freetype.mk
@@ -84,7 +84,7 @@ INCLUDE_FLAGS = $(INCLUDES:%=$I%)
#
FT_CFLAGS = $(CFLAGS) $(INCLUDE_FLAGS)
FT_CC = $(CC) $(FT_CFLAGS)
-FT_COMPILE = $(FT_CC)
+FT_COMPILE = $(CC) $(ANSI_FLAGS) $(FT_CFLAGS)
#
@@ -160,10 +160,10 @@ $(FTINIT_OBJ): $(FTINIT_SRC) $(BASE_H) $(FTINIT_DRIVER_H) $(FT_MODULE_LIST)
# ommitted on builds which do not want them.
#
OBJ_M = $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M) \
- $(FTSYS_OBJ) $(FTINIT_OBJ) $(FTDEBUG_OBJ)
+ $(FTINIT_OBJ)
OBJ_S = $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S) \
- $(FTSYS_OBJ) $(FTINIT_OBJ) $(FTDEBUG_OBJ)
+ $(FTINIT_OBJ)
ifneq ($(findstring multi,$(MAKECMDGOALS)),)
OBJECTS_LIST += $(OBJ_M)
@@ -179,17 +179,34 @@ library: $(FT_LIBRARY)
$(FT_COMPILE) $T$@ $<
-clean_freetype:
- -$(DELETE) $(OBJ_S:/=$(SEP)) $(OBJ_M:/=$(SEP))
-
+# Standard cleaning and distclean rules. These are not accepted
+# on all systems though..
+#
+clean_freetype_std:
+ -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(OBJ_S) $(OBJ_M))
-distclean_freetype: clean_freetype
- -$(DELETE) $(FT_LIBRARY:/=$(SEP))
+distclean_freetype_std: clean_freetype_std
+ -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY))
-$(DELETE) *.orig *~ core *.core
+# The Dos command shell does not support very long list of arguments
+# so we're stuck with wildcards
+#
+#SYSOBJ_ := $(subst $(SEP),\,$(OBJ_))
+
+clean_freetype_dos:
+ -del $(subst $(SEP),$(HOSTSEP),$(OBJ_))*.$O 2> nul
+
+distclean_freetype_dos: clean_freetype_dos
+ -del $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
+
remove_config_mk:
- -$(DELETE) $(CONFIG_MK:/=$(SEP))
+ -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(CONFIG_MK)) 2> nul
+# the "config.mk" must define 'clean_freetype' and 'distclean_freetype'
+# implementations may use to relay these to either the 'std' or 'dos'
+# versions, or simply provide their own implementation..
+#
clean: clean_freetype
distclean: distclean_freetype remove_config_mk
diff --git a/config/modules.mk b/config/modules.mk
index 0ad7db1..56678d9 100644
--- a/config/modules.mk
+++ b/config/modules.mk
@@ -36,8 +36,8 @@ FT_MODULE_LIST := $(BUILD)$(SEP)ftmodule.h
# file in order to `clean' the list
#
clean_module_list:
- @$(DELETE) $(FT_MODULE_LIST)
- @echo Regenerating the font drivers list in '$(FT_MODULE_LIST)'
+ @-$(DELETE) $(FT_MODULE_LIST)
+ @-echo Regenerating the font drivers list in $(FT_MODULE_LIST)
make_module_list: clean_module_list
@echo -- done --
diff --git a/config/os2/Makefile.emx b/config/os2/Makefile.emx
index 75394ea..5d3446d 100644
--- a/config/os2/Makefile.emx
+++ b/config/os2/Makefile.emx
@@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
-#* SEP Directory separator for the current platform.
-#* Either / or \ (maybe : on Macs)
-#*
+#* SEP Directory separator used during compilation.
+#* (usually "/" or "\"). Note that on Win32, both gcc
+#* and Visual C++ use "/" as a directory separator !!
+#*
+#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
+#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@@ -82,13 +85,24 @@ endif
DELETE := del
SEP := /
+HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/os2
PLATFORM := os2
CC := gcc
# the directory where all object files are placed
#
-OBJ_DIR := $(TOP)/obj
+# Note that this is not $(TOP)/obj !!
+# This lets you build the library in your own directory
+# with something like :
+#
+# set TOP=....../path/to/freetype2/top/dir...
+# mkdir obj
+# make -f %TOP%/Makefile setup [options]
+# make -f %TOP%/Makefile
+#
+#
+OBJ_DIR := obj
# the directory where all library files are placed
@@ -155,11 +169,18 @@ ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall
endif
+# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
+# nothing (if it already is by default like LCC).
+#
+ANSIFLAGS := -ansi -pedantic
+
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
+clean_freetype: clean_freetype_dos
+distclean_freetype: distclean_freetype_dos
# Librarian to use to build the static library
#
diff --git a/config/os2/makefile.devel b/config/os2/makefile.devel
index f390f79..0f413a4 100644
--- a/config/os2/makefile.devel
+++ b/config/os2/makefile.devel
@@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
-#* SEP Directory separator for the current platform.
-#* Either / or \ (maybe : on Macs)
-#*
+#* SEP Directory separator used during compilation.
+#* (usually "/" or "\"). Note that on Win32, both gcc
+#* and Visual C++ use "/" as a directory separator !!
+#*
+#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
+#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@@ -78,13 +81,24 @@
DELETE := del
SEP := /
+HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/os2
PLATFORM := os2
CC := gcc
# the directory where all object files are placed
#
-OBJ_DIR := $(TOP)/obj
+# Note that this is not $(TOP)/obj !!
+# This lets you build the library in your own directory
+# with something like :
+#
+# set TOP=....../path/to/freetype2/top/dir...
+# mkdir obj
+# make -f %TOP%/Makefile setup [options]
+# make -f %TOP%/Makefile
+#
+#
+OBJ_DIR := obj
# the directory where all library files are placed
@@ -151,11 +165,18 @@ ifndef CFLAGS
CFLAGS := -c -g -O0 -Wall
endif
+# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
+# nothing (if it already is by default like LCC).
+#
+ANSIFLAGS := -ansi -pedantic
+
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
+clean_freetype: clean_freetype_dos
+distclean_freetype: distclean_freetype_dos
# Librarian to use to build the static library
#
diff --git a/config/os2/makefile.gcc b/config/os2/makefile.gcc
index dfd041c..9f03e52 100644
--- a/config/os2/makefile.gcc
+++ b/config/os2/makefile.gcc
@@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
-#* SEP Directory separator for the current platform.
-#* Either / or \ (maybe : on Macs)
-#*
+#* SEP Directory separator used during compilation.
+#* (usually "/" or "\"). Note that on Win32, both gcc
+#* and Visual C++ use "/" as a directory separator !!
+#*
+#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
+#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@@ -78,13 +81,24 @@
DELETE := del
SEP := /
+HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/os2
PLATFORM := os2
CC := gcc
# the directory where all object files are placed
#
-OBJ_DIR := $(TOP)/obj
+# Note that this is not $(TOP)/obj !!
+# This lets you build the library in your own directory
+# with something like :
+#
+# set TOP=....../path/to/freetype2/top/dir...
+# mkdir obj
+# make -f %TOP%/Makefile setup [options]
+# make -f %TOP%/Makefile
+#
+#
+OBJ_DIR := obj
# the directory where all library files are placed
@@ -151,26 +165,18 @@ ifndef CFLAGS
CFLAGS := -c -g -O0 -Wall
endif
+# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
+# nothing (if it already is by default like LCC).
+#
+ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
-# A rule used to clean all objects from OBJ_DIR
-#
-# The OS/2 command shell does not support very long list of arguments
-# so we're stuck with wildcards
-#
-
-DIR_OBJ := $(subst $(SEP),\,$(OBJ_DIR))
-
-clean_freetype_objects:
- -del $(DIR8OBJ)\*.$O
-
-clean_freetype_lib:
- -del $(FT_LIBRARY)
+clean_freetype: clean_freetype_dos
+distclean_freetype: distclean_freetype_dos
-clean: clean_freetype_objects
# Librarian to use to build the static library
#
diff --git a/config/unix/Makefile b/config/unix/Makefile
index 59c08fe..779b0d8 100644
--- a/config/unix/Makefile
+++ b/config/unix/Makefile
@@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
-#* SEP Directory separator for the current platform.
-#* Either / or \ (maybe : on Macs)
-#*
+#* SEP Directory separator used during compilation.
+#* (usually "/" or "\"). Note that on Win32, both gcc
+#* and Visual C++ use "/" as a directory separator !!
+#*
+#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
+#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@@ -82,12 +85,23 @@ endif
DELETE := rm -f
SEP := /
+HOSTSEP := $(SEP)
BUILD := $(TOP)/config/unix
PLATFORM := unix
# the directory where all object files are placed
#
-OBJ_DIR := $(TOP)/obj
+# Note that this is not $(TOP)/obj !!
+# This lets you build the library in your own directory
+# with something like :
+#
+# set TOP=....../path/to/freetype2/top/dir...
+# mkdir obj
+# make -f %TOP%/Makefile setup [options]
+# make -f %TOP%/Makefile
+#
+#
+OBJ_DIR := obj
# the directory where all library files are placed
@@ -154,10 +168,17 @@ ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall
endif
+# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
+# nothing (if it already is by default like LCC).
+#
+ANSIFLAGS := -ansi -pedantic
+
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
+clean_freetype: clean_freetype_std
+distclean_freetype: clean_freetype_library_std
# This final rule is used to link all object files into a single
# library. It is part of the system-specific sub-Makefile because not
diff --git a/config/unix/Makefile.devel b/config/unix/Makefile.devel
index 8710a7c..548637b 100644
--- a/config/unix/Makefile.devel
+++ b/config/unix/Makefile.devel
@@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
-#* SEP Directory separator for the current platform.
-#* Either / or \ (maybe : on Macs)
-#*
+#* SEP Directory separator used during compilation.
+#* (usually "/" or "\"). Note that on Win32, both gcc
+#* and Visual C++ use "/" as a directory separator !!
+#*
+#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
+#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@@ -82,12 +85,23 @@ endif
DELETE := rm -f
SEP := /
+HOSTSEP := $(SEP)
BUILD := $(TOP)/config/unix
PLATFORM := unix
# the directory where all object files are placed
#
-OBJ_DIR := $(TOP)/obj
+# Note that this is not $(TOP)/obj !!
+# This lets you build the library in your own directory
+# with something like :
+#
+# set TOP=....../path/to/freetype2/top/dir...
+# mkdir obj
+# make -f %TOP%/Makefile setup [options]
+# make -f %TOP%/Makefile
+#
+#
+OBJ_DIR := obj
# the directory where all library files are placed
@@ -154,10 +168,17 @@ ifndef CFLAGS
CFLAGS := -c -g -O0 -Wall
endif
+# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
+# nothing (if it already is by default like LCC).
+#
+ANSIFLAGS := -ansi -pedantic
+
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
+clean_freetype: clean_freetype_std
+distclean_freetype: distclean_freetype_std
# This final rule is used to link all object files into a single
# library. It is part of the system-specific sub-Makefile because not
diff --git a/config/win32/Makefile.gcc b/config/win32/Makefile.gcc
index b81a5c6..fcfb2f5 100644
--- a/config/win32/Makefile.gcc
+++ b/config/win32/Makefile.gcc
@@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
-#* SEP Directory separator for the current platform.
-#* Either / or \ (maybe : on Macs)
-#*
+#* SEP Directory separator used during compilation.
+#* (usually "/" or "\"). Note that on Win32, both gcc
+#* and Visual C++ use "/" as a directory separator !!
+#*
+#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
+#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@@ -82,13 +85,24 @@ endif
DELETE := del
SEP := /
+HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/win32
PLATFORM := win32
CC := gcc
# the directory where all object files are placed
#
-OBJ_DIR := $(TOP)/obj
+# Note that this is not $(TOP)/obj !!
+# This lets you build the library in your own directory
+# with something like :
+#
+# set TOP=....../path/to/freetype2/top/dir...
+# mkdir obj
+# make -f %TOP%/Makefile setup [options]
+# make -f %TOP%/Makefile
+#
+#
+OBJ_DIR := obj
# the directory where all library files are placed
@@ -155,11 +169,18 @@ ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall
endif
+# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
+# nothing (if it already is by default like LCC).
+#
+ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
+clean_freetype: clean_freetype_dos
+distclean_freetype: distclean_freetype_dos
+
# Librarian to use to build the static library
#
FT_LIBRARIAN := $(AR) -r
@@ -172,7 +193,7 @@ FT_LIBRARIAN := $(AR) -r
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
- -$(DELETE) $@
+ -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
endif
diff --git a/config/win32/Makefile.lcc b/config/win32/Makefile.lcc
index d2cd03d..46c2afb 100644
--- a/config/win32/Makefile.lcc
+++ b/config/win32/Makefile.lcc
@@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
-#* SEP Directory separator for the current platform.
-#* Either / or \ (maybe : on Macs)
-#*
+#* SEP Directory separator used during compilation.
+#* (usually "/" or "\"). Note that on Win32, both gcc
+#* and Visual C++ use "/" as a directory separator !!
+#*
+#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
+#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@@ -82,13 +85,24 @@ endif
DELETE := del
SEP := /
+HOSTSEP := \\
BUILD := $(TOP)$(SEP)config$(SEP)win32
PLATFORM := win32
CC := lcc
# the directory where all object files are placed
#
-OBJ_DIR := $(TOP)$(SEP)obj
+# Note that this is not $(TOP)/obj !!
+# This lets you build the library in your own directory
+# with something like :
+#
+# set TOP=....../path/to/freetype2/top/dir...
+# mkdir obj
+# make -f %TOP%/Makefile setup [options]
+# make -f %TOP%/Makefile
+#
+#
+OBJ_DIR := obj
# the directory where all library files are placed
@@ -156,10 +170,18 @@ ifndef CFLAGS
CFLAGS := -c -g2 -O
endif
+# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
+# nothing (if it already is by default like LCC).
+#
+ANSIFLAGS :=
+
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
+clean_freetype: clean_freetype_dos
+distclean_freetype: distclean_freetype_dos
+
# This final rule is used to link all object files into a single
# library. It is part of the system-specific sub-Makefile because not
# all librarians accept a simple syntax like :
diff --git a/config/win32/Makefile.vcc b/config/win32/Makefile.vcc
index eb251c6..230e31a 100644
--- a/config/win32/Makefile.vcc
+++ b/config/win32/Makefile.vcc
@@ -78,13 +78,24 @@
DELETE := del
SEP := /
+HOSTSEP := $(strip \ )
BUILD := $(TOP)$(SEP)config$(SEP)win32
PLATFORM := win32
CC := cl
# the directory where all object files are placed
#
-OBJ_DIR := $(TOP)$(SEP)obj
+# Note that this is not $(TOP)/obj !!
+# This lets you build the library in your own directory
+# with something like :
+#
+# set TOP=....../path/to/freetype2/top/dir...
+# mkdir obj
+# make -f %TOP%/Makefile setup [options]
+# make -f %TOP%/Makefile
+#
+#
+OBJ_DIR := obj
# the directory where all library files are placed
@@ -147,27 +158,29 @@ T := /Fo
# - ansi compliance..
#
ifndef CFLAGS
-CFLAGS := /nologo /c /Ox /G5 /Za /W3 /WX
+CFLAGS := /nologo /c /Ox /G5 /W3 /WX
endif
+# ANSI_FLAGS : put there the flags used to make your compiler ANSI-compliant
+# nothing (if it already is by default like LCC).
+#
+ANSI_FLAGS := /Za
+
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
+clean_freetype: clean_freetype_dos
+distclean_freetype: distclean_freetype_dos
+
# This final rule is used to link all object files into a single
# library. It is part of the system-specific sub-Makefile because not
# all librarians accept a simple syntax like :
#
# librarian library_file {list of object files}
#
-# The LCC-Win32 Librarian, called LCCLIB needs all object files in the current
-# directory. That _is_ stupid, but we'll have to deal with it..
-#
-
-DIR_OBJ := $(subst /,\\,$(OBJ_DIR))
-
$(FT_LIBRARY): $(OBJECTS_LIST)
- lib /out:$@ $(OBJECTS_LIST)
+ lib /nologo /out:$@ $(OBJECTS_LIST)
endif