4 # First part of make rules, included in ptlib.mak and pwlib.mak.
5 # Note: Do not put any targets in the file. This should defaine variables
6 # only, as targets are all in common.mak
8 # Portable Windows Library
10 # Copyright (c) 1993-1998 Equivalence Pty. Ltd.
12 # The contents of this file are subject to the Mozilla Public License
13 # Version 1.0 (the "License"); you may not use this file except in
14 # compliance with the License. You may obtain a copy of the License at
15 # http://www.mozilla.org/MPL/
17 # Software distributed under the License is distributed on an "AS IS"
18 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19 # the License for the specific language governing rights and limitations
22 # The Original Code is Portable Windows Library.
24 # The Initial Developer of the Original Code is Equivalence Pty. Ltd.
26 # Portions are Copyright (C) 1993 Free Software Foundation, Inc.
27 # All Rights Reserved.
29 # Contributor(s): ______________________________________.
32 # Revision 1.203 2007/08/06 00:36:37 csoutheren
33 # NDEBUG is passed to opt builds, _DEBUG is passed to debug builds
35 # Revision 1.202 2006/06/27 11:52:14 csoutheren
36 # Patch 1509205 - Fixes typo in GCC flags under Solaris
37 # Thanks to Boris Pavacic
39 # Revision 1.201 2006/05/15 23:11:26 dereksmithies
40 # Use -ggdb -O0 -g3 to provide more information to the debugger, and force all
41 # optimisation to be off. Initial tests show: this improves linux debugging.
43 # Revision 1.200 2006/01/17 18:57:17 dsandras
44 # Applied patch from Brian Lu <brian lu sun com> to fix compilation with SUN
47 # Revision 1.199 2006/01/08 14:49:08 dsandras
48 # Several fixes to allow compilation on Open Solaris thanks to Brian Lu <brian.lu _AT_____ sun.com>. Many thanks!
50 # Revision 1.198 2005/12/04 22:50:50 csoutheren
51 # Applied patch for Alpha thanks to Kilian Krause
53 # Revision 1.197 2005/12/04 22:38:38 csoutheren
54 # Added patch for hppa64. Thanks to Kilian Krause
56 # Revision 1.196 2005/09/25 10:51:23 dominance
57 # almost complete the mingw support. We'll be there soon. ;)
59 # Revision 1.195 2005/02/23 21:29:52 dominance
60 # have configure check for bison as we know we'll need it and stop implicit definition of PWLIBDIR. *geesh* that was about time, eh? ;)
62 # Revision 1.194 2005/01/14 11:49:17 csoutheren
63 # Removed -s flag so executables are not stripped by default
65 # Revision 1.193 2004/11/16 00:32:34 csoutheren
66 # Added Cygwin support
68 # Revision 1.192 2004/10/28 20:07:10 csoutheren
69 # Fixes for MacOSX platforms, thanks to Hannes Friederich
71 # Revision 1.191 2004/08/31 23:52:31 csoutheren
72 # Changed check for Mac OS version, thanks to Hannes Friederich
74 # Revision 1.190 2004/06/18 00:38:08 csoutheren
75 # Added check for FD_SETSIZE as suggested by Joegen E. Baclor
77 # Revision 1.189 2004/06/10 01:36:44 csoutheren
78 # Fixed problems with static links
80 # Revision 1.188 2004/05/30 04:49:42 ykiryanov
81 # Streamlined BeOS section
83 # Revision 1.187 2004/04/25 22:11:34 ykiryanov
84 # Added posix library to make files
86 # Revision 1.186 2004/04/21 03:47:36 ykiryanov
87 # Added libdl.so to library list for BeOS
89 # Revision 1.185 2004/04/12 03:35:27 csoutheren
90 # Fixed problems with non-recursuve mutexes and critical sections on
91 # older compilers and libc
93 # Revision 1.184 2004/02/26 11:19:07 csoutheren
94 # Added changes for BeOS, thanks to Yuri Kiryanov
95 # Added changes to fix link problems on some platforms, thanks to Klaus Kaempf
97 # Revision 1.183 2004/02/21 19:44:54 ykiryanov
98 # Fixed make parameters for BeOS: Changed default on BeOS to using Be BONE
100 # Revision 1.182 2004/02/11 05:09:14 csoutheren
101 # Fixed problems with regex libraries on Solaris, and with host OS numbering
102 # being a quoted string rather than a number. Thanks to Chad Attermann
103 # Fixed problems SSL detection problems thanks to Michal Zygmuntowicz
105 # Revision 1.181 2004/02/09 06:24:37 csoutheren
106 # Allowed CXX environment variable to define C++ compiler to use
107 # as required by configure
109 # Revision 1.180 2004/01/29 13:43:59 csoutheren
110 # Moved some preprocessor symbols from the command line to include files
111 # Modified to set P_HAS_SEMAPHORES to 0 for Linux kernels >= 2.6
112 # Applied patches for Solaris thanks to Michal Zygmuntowicz
114 # Revision 1.179 2003/11/02 16:00:26 shawn
115 # Panther requires -lresolv
117 # Revision 1.178 2003/09/18 23:02:35 csoutheren
118 # Removed definition of PMEMORY_CHECK
120 # Revision 1.177 2003/09/17 01:18:03 csoutheren
121 # Removed recursive include file system and removed all references
122 # to deprecated coooperative threading support
124 # Revision 1.176 2003/09/08 21:11:09 dereksmithies
125 # Remove hardcoded path from make file. Thanks Damien Sandras.
127 # Revision 1.175 2003/07/24 22:01:42 dereksmithies
128 # Add fixes from Peter Nixon for fixing install problems. Thanks.
130 # Revision 1.174 2003/06/18 13:19:01 csoutheren
131 # Default debug builds now shared
133 # Revision 1.173 2003/06/17 12:05:01 csoutheren
134 # Changed compiler flags for optimised build
136 # Revision 1.172 2003/05/22 12:17:06 dsandras
138 # Removed unneeded code since Firewire support has been moved to configure.
140 # Revision 1.171 2003/05/06 09:47:20 robertj
141 # Fixed up MacOSX changes so is compatible with previous "API" not requiring
142 # downstream libraries to change
144 # Revision 1.170 2003/05/06 06:59:12 robertj
145 # Dynamic library support for MacOSX, thanks Hugo Santos
147 # Revision 1.169 2003/05/05 13:10:59 robertj
148 # Solaris compatibility
150 # Revision 1.168 2003/04/17 07:29:27 robertj
151 # Fixed solaris link problem
153 # Revision 1.167 2003/04/17 00:05:04 craigs
154 # Added patches from Hugo Santos mainly for Darwin compatibility
156 # Revision 1.166 2003/04/16 07:16:55 craigs
157 # Modified for new autoconf based configuration
160 # Log truncated by CRS 14 April 2003
164 echo
"No PWLIBDIR environment variable defined!"
165 echo
"You need to define PWLIBDIR!"
166 echo
"Try something like:"
167 echo
"PWLIBDIR = $(HOME)/pwlib"
171 ####################################################
173 # include generated build options file, then include it
174 include $(PWLIBDIR
)/make
/ptbuildopts.mak
176 ###############################################################################
178 # this section used to normalise the machine name and OS type
179 # this is now done by autoconf - but this left here as a reference
183 ifdef USE_OLD_MACHINE_CHECKING
186 OSTYPE
:= $(shell uname
-s
)
190 MACHTYPE
:= $(shell uname
-m
)
193 ifneq (,$(findstring linux
,$(HOSTTYPE
)))
194 ifneq (,$(findstring $(HOSTTYPE
),i386-linux i486-linux
))
200 ifeq ($(OSTYPE
),mklinux
)
205 ifneq (,$(findstring $(OSTYPE
),Linux linux-gnu
))
209 ifneq (,$(findstring $(OSTYPE
),Solaris SunOS
))
213 ifneq (,$(findstring $(OSTYPE
),IRIX
))
217 #Convert bash shell OSTYPE of 'freebsd3.4' to 'FreeBSD'
218 ifneq (,$(findstring freebsd
,$(OSTYPE
)))
222 #Convert bash shell OSTYPE of 'openbsd2.6' to 'OpenBSD'
223 ifneq (,$(findstring openbsd
,$(OSTYPE
)))
227 ifneq (,$(findstring macos
,$(OSTYPE
)))
231 ifneq (,$(findstring darwin
,$(OSTYPE
)))
235 ifneq (,$(findstring AIX
,$(OSTYPE
)))
239 ifneq (,$(findstring $(OS
),VXWORKS
))
243 ifneq (,$(findstring netbsd
,$(OSTYPE
)))
247 ifneq (,$(findstring sparc
, $(MACHTYPE
)))
251 ifneq (,$(findstring sun4
, $(MACHTYPE
)))
255 ifneq (,$(findstring i86
, $(MACHTYPE
)))
259 ifneq (,$(findstring i386
, $(MACHTYPE
)))
263 ifneq (,$(findstring i486
, $(MACHTYPE
)))
265 POSSIBLE_CPUTYPE
:= i486
268 ifneq (,$(findstring i586
, $(MACHTYPE
)))
270 POSSIBLE_CPUTYPE
:= i586
273 ifneq (,$(findstring i686
, $(MACHTYPE
)))
275 POSSIBLE_CPUTYPE
:= i686
278 #make sure x86 does not match x86_64 by mistake
279 ifneq (,$(findstring x86
, $(MACHTYPE
)))
280 ifneq (,$(findstring x86_64
, $(MACHTYPE
)))
287 ifneq (,$(findstring powerpc
, $(MACHTYPE
)))
291 ifneq (,$(findstring ppc
, $(MACHTYPE
)))
292 ifneq (,$(findstring ppc64
, $(MACHTYPE
)))
299 ifneq (,$(findstring Power
, $(MACHTYPE
)))
303 ifneq (,$(findstring mips
, $(MACHTYPE
)))
307 ifneq (,$(findstring alpha
, $(MACHTYPE
)))
311 ifneq (,$(findstring sparc
, $(MACHTYPE
)))
315 ifneq (,$(findstring ia64
, $(MACHTYPE
)))
319 ifneq (,$(findsting hppa64
, $(MACHTYPE
)))
323 ifneq (,$(findstring s390
, $(MACHTYPE
)))
324 ifneq (,$(findstring s390x
, $(MACHTYPE
)))
331 ifneq (,$(findstring armv4l
, $(MACHTYPE
)))
335 CPUTYPE
:= $(POSSIBLE_CPUTYPE
)
340 endif # USE_OLD_MACHINE_CHECKING
344 optdepend debugdepend bothdepend \
345 optshared debugshared bothshared \
346 optnoshared debugnoshared bothnoshared \
347 optclean debugclean
clean \
350 .PHONY
: all $(STANDARD_TARGETS
)
353 ifeq (,$(findstring $(OSTYPE
),linux FreeBSD OpenBSD NetBSD solaris beos Darwin Carbon AIX Nucleus VxWorks rtems QNX cygwin mingw
))
357 @echo
######################################################################
358 @echo
"Warning: OSTYPE=$(OSTYPE) support has not been confirmed. This may"
359 @echo
" be a new operating system not yet encountered, or more"
360 @echo
" likely, the OSTYPE and MACHTYPE environment variables are"
361 @echo
" set to unusual values. You may need to explicitly set these"
362 @echo
" variables for the correct operation of this system."
364 @echo
" Currently supported OSTYPE names are:"
365 @echo
" linux Linux linux-gnu mklinux"
366 @echo
" solaris Solaris SunOS"
367 @echo
" FreeBSD OpenBSD NetBSD beos Darwin Carbon"
368 @echo
" VxWorks rtems mingw"
370 @echo
" **********************************"
371 @echo
" *** DO NOT IGNORE THIS MESSAGE ***"
372 @echo
" **********************************"
374 @echo
" The system almost certainly will not compile! When you get"
375 @echo
" it working please send patches to support@equival.com.au"
376 @echo
######################################################################
379 $(STANDARD_TARGETS
) :: default_target
383 default_target
: help
387 ####################################################
389 # Set default for shared library usage
397 # -Wall must be at the start of the options otherwise
398 # any -W overrides won't have any effect
399 ifeq ($(USE_GCC
),yes
)
404 STDCCFLAGS
+= $(RPM_OPT_FLAGS
)
407 ifneq ($(OSTYPE
),rtems
)
409 SYSINCDIR
:= /usr
/include
413 ####################################################
415 ifeq ($(OSTYPE
),linux
)
417 ifeq ($(MACHTYPE
),x86
)
419 ifeq ($(CPUTYPE
),crusoe
)
420 STDCCFLAGS
+= -fomit-frame-pointer
-fno-strict-aliasing
-fno-common
-pipe
-mpreferred-stack-boundary
=2 -march
=i686
-malign-functions
=0
421 STDCCFLAGS
+= -malign-jumps
=0 -malign-loops
=0
423 STDCCFLAGS
+= -mcpu
=$(CPUTYPE
)
428 ifeq ($(MACHTYPE
),ia64
)
429 STDCCFLAGS
+= -DP_64BIT
432 ifeq ($(MACHTYPE
),hppa64
)
433 STDCCFLAGS
+= -DP_64BIT
436 ifeq ($(MACHTYPE
),s390x
)
437 STDCCFLAGS
+= -DP_64BIT
440 ifeq ($(MACHTYPE
),x86_64
)
441 STDCCFLAGS
+= -DP_64BIT
445 ifeq ($(MACHTYPE
),ppc64
)
446 STDCCFLAGS
+= -DP_64BIT
449 ifeq ($(P_SHAREDLIB
),1)
451 STDCCFLAGS
+= -fPIC
-DPIC
456 STATIC_LIBS
:= libstdc
++.a libg
++.a libm.a libc.a
457 SYSLIBDIR
:= $(shell $(PWLIBDIR
)/make
/ptlib-config
--libdir)
462 ####################################################
464 ifeq ($(OSTYPE
),FreeBSD
)
466 ifeq ($(MACHTYPE
),x86
)
468 STDCCFLAGS
+= -mcpu
=$(CPUTYPE
)
473 #STDCCFLAGS += -DP_USE_PRAGMA # migrated to configure
479 ####################################################
481 ifeq ($(OSTYPE
),OpenBSD
)
483 ifeq ($(MACHTYPE
),x86
)
490 #STDCCFLAGS += -DP_USE_PRAGMA # migrated to configure
496 ####################################################
498 ifeq ($(OSTYPE
),NetBSD
)
500 ifeq ($(MACHTYPE
),x86
)
506 STDCCFLAGS
+= -I
$(UNIX_INC_DIR
) -I
$(PWLIBDIR
)/include
508 # enable the USE_PTH line to compile using pth
509 # enable the USE_NATIVE_THREADS line to compile using native threads
510 # enable the USE_UNPROVEN_THREADS line to compile using unproven threads
511 #USE_PTH_THREADS := 1
512 #USE_UNPROVEN_THREADS := 1
513 USE_NATIVE_THREADS
:= 1
516 ifdef USE_NATIVE_THREADS
519 ifdef USE_PTH_THREADS
520 STDCCFLAGS
+= -DP_GNU_PTH
521 STDCCFLAGS
+= -I
/usr
/pkg
/include
522 LDFLAGS
+= -L
/usr
/pkg
/lib
525 STDCCFLAGS
+= -DP_NO_CANCEL
526 STDCCFLAGS
+= -I
/usr
/pkg
/pthreads
/include
527 LDFLAGS
+= -L
/usr
/pkg
/pthreads
/lib
529 CC
:= /usr
/pkg
/pthreads
/bin
/pgcc
530 CPLUS
:= /usr
/pkg
/pthreads
/bin
/pg
++
536 #STDCCFLAGS += -DP_USE_PRAGMA # migrated to configure
542 ####################################################
546 STDCCFLAGS
+= -DP_AIX
548 # LDLIBS += -lossaudio
550 STDCCFLAGS
+= -mminimal-toc
553 STDCCFLAGS
+= -DP_USE_PRAGMA
559 ####################################################
561 ifeq ($(OSTYPE
),sunos
)
563 # Sparc Sun 4x, using gcc 2.7.2
566 REQUIRES_SEPARATE_SWITCH
= 1
567 #STDCCFLAGS += -DP_USE_PRAGMA # migrated to configure
572 ####################################################
574 ifeq ($(OSTYPE
),solaris
)
576 # Solaris (Sunos 5.x)
581 ifeq ($(MACHTYPE
),x86
)
582 ifeq ($(USE_GCC
),yes
)
583 DEBUG_FLAG
:= -gstabs
+
585 CXXFLAGS
+= -DUSE_GCC
589 ENDLDLIBS
+= -lsocket
-lnsl
-ldl
-lposix4
591 # Sparc Solaris 2.x, using gcc 2.x
596 #STDCCFLAGS += -DP_USE_PRAGMA # migrated to configure
598 STATIC_LIBS
:= libstdc
++.a libg
++.a
599 SYSLIBDIR
:= /opt
/openh323
/lib
601 # Rest added by jpd@louisiana.edu, to get .so libs created!
606 STDCCFLAGS
+= -fPIC
-DPIC
613 ####################################################
615 ifeq ($(OSTYPE
),irix
)
617 # should work whith Irix 6.5
621 STDCCFLAGS
+= -DP_IRIX
622 LDLIBS
+= -lsocket
-lnsl
624 STDCCFLAGS
+= -DP_USE_PRAGMA
629 ####################################################
631 ifeq ($(OSTYPE
),beos
)
633 SYSLIBS
+= -lbe
-lmedia
-lgame
-lroot
-lsocket
-lbind
-ldl
634 STDCCFLAGS
+= -DBE_THREADS
-DP_USE_PRAGMA
-Wno-multichar
-Wno-format
641 ####################################################
643 ifeq ($(OSTYPE
),ultrix
)
645 # R2000 Ultrix 4.2, using gcc 2.7.x
646 STDCCFLAGS
+= -DP_ULTRIX
647 STDCCFLAGS
+= -DP_USE_PRAGMA
651 ####################################################
653 ifeq ($(OSTYPE
),hpux
)
654 STDCCFLAGS
+= -DP_USE_PRAGMA
655 # HP/UX 9.x, using gcc 2.6.C3 (Cygnus version)
656 STDCCFLAGS
+= -DP_HPUX9
661 ####################################################
663 ifeq ($(OSTYPE
),Darwin
)
665 # MacOS X or later / Darwin
667 CFLAGS
+= -fno-common
-dynamic
668 LDFLAGS
+= -multiply_defined suppress
669 ENDLDLIBS
+= -lresolv
-framework AudioToolbox
-framework CoreAudio
670 ENDLDLIBS
+= -framework AudioUnit
-framework CoreServices
671 STDCCFLAGS
+= -D__MACOSX__
673 # Quicktime support is still a long way off. But for development purposes,
674 # I am inluding the flags to allow QuickTime to be linked.
675 # Uncomment them if you wish, but it will do nothing for the time being.
678 #STDCCFLAGS += -DHAS_QUICKTIMEX
679 #ENDLDLIBS += -framework QuickTime
681 ifeq ($(MACHTYPE
),x86
)
685 ARCHIVE
:= libtool
-static
-o
693 ifeq ($(OSTYPE
),Carbon
)
695 # MacOS 9 or X using Carbonlib calls
697 STDCCFLAGS
+= -DP_MACOS
699 # I'm having no end of trouble with the debug memory allocator.
702 # Carbon is only available for full Mac OS X, not pure Darwin, so the only
703 # currently available architecture is PPC.
705 STDCCFLAGS
+= -DP_MAC_MPTHREADS
706 LDLIBS
+= -prebind
-framework CoreServices
-framework QuickTime
-framework Carbon
716 ####################################################
718 ifeq ($(OSTYPE
),VxWorks
)
720 ifeq ($(MACHTYPE
),ARM
)
721 STDCCFLAGS
+= -mcpu
=arm8
-DCPU
=ARMARCH4
724 STDCCFLAGS
+= -DP_VXWORKS
-DPHAS_TEMPLATES
-DVX_TASKS
725 STDCCFLAGS
+= -DNO_LONG_DOUBLE
727 STDCCFLAGS
+= -Wno-multichar
-Wno-format
731 STDCCFLAGS
+= -DP_USE_PRAGMA
736 ####################################################
738 ifeq ($(OSTYPE
),rtems
)
740 CC
:= $(MACHTYPE
)-rtems-gcc
--pipe
741 CPLUS
:= $(MACHTYPE
)-rtems-g
++
742 #LD := $(MACHTYPE)-rtems-ld
743 #AR := $(MACHTYPE)-rtems-ar
744 #RUNLIB := $(MACHTYPE)-rtems-runlib
746 SYSLIBDIR
:= $(RTEMS_MAKEFILE_PATH
)/lib
747 SYSINCDIR
:= $(RTEMS_MAKEFILE_PATH
)/lib
/include
749 LDFLAGS
+= -B
$(SYSLIBDIR
)/ -specs
=bsp_specs
-qrtems
750 STDCCFLAGS
+= -B
$(SYSLIBDIR
)/ -specs
=bsp_specs
-ansi
-fasm
-qrtems
752 ifeq ($(CPUTYPE
),mcpu32
)
753 STDCCFLAGS
+= -mcpu32
757 ifeq ($(CPUTYPE
),mpc860
)
758 STDCCFLAGS
+= -mcpu
=860
762 STDCCFLAGS
+= -DP_RTEMS
-DP_HAS_SEMAPHORES
768 ####################################################
772 ifeq ($(MACHTYPE
),x86
)
773 STDCCFLAGS
+= -Wc
,-m486
776 STDCCFLAGS
+= -DP_QNX
-DP_HAS_RECURSIVE_MUTEX
=1 -DFD_SETSIZE
=1024
778 ENDLDLIBS
+= -lsocket
-lstdc
++
780 CC
:= qcc
-Vgcc_ntox86
781 CPLUS
:= qcc
-Vgcc_ntox86_gpp
784 STDCCFLAGS
+= -DP_USE_PRAGMA
786 ifeq ($(P_SHAREDLIB
),1)
787 ifeq ($(USE_GCC
),yes
)
788 STDCCFLAGS
+= -shared
790 ifeq ($(OSTYPE
),solaris
)
799 ####################################################
801 ifeq ($(OSTYPE
),Nucleus
)
804 STDCCFLAGS
+= -msoft-float
-nostdinc
$(DEBUGFLAGS
)
805 STDCCFLAGS
+= -D__NUCLEUS_PLUS__
-D__ppc
-DWOT_NO_FILESYSTEM
-DPLUS \
806 -D__HAS_NO_FLOAT
-D__USE_STL__ \
808 -D__NUCLEUS_NET__
-D__NEWLIB__ \
814 NUCLEUSDIR
= ${WORK}/embedded
/os
/Nucleus
817 STLDIR
= ${WORK}/embedded
/packages
/stl-3.2
-stream
819 STDCCFLAGS
+= -I
$(NUCLEUSDIR
)/plus \
820 -I
$(NUCLEUSDIR
)/plusplus \
821 -I
$(NUCLEUSDIR
)/net \
823 -I
$(PWLIBDIR
)/include/ptlib
/Nucleus
++ \
824 -I
$(WORK
)/embedded
/libraries
/socketshim
/BerkleySockets \
826 -I
/usr
/local
/powerpc-motorola-eabi
/include \
827 -I
${WORK}/embedded
/libraries
/configuration
829 UNIX_SRC_DIR
= $(PWLIBDIR
)/src
/ptlib
/Nucleus
++
833 ####################################################
835 ifeq ($(OSTYPE
),mingw
)
836 LDFLAGS
+= -enable-auto-import
-enable-runtime-pseudo-reloc
837 LDFLAGS
+= -enable-stdcall-fixup
-fatal-warning
840 ###############################################################################
842 # Make sure some things are defined
878 # Further configuration
885 PLATFORM_TYPE
= $(OSTYPE
)_
$(MACHTYPE
)
887 PLATFORM_TYPE
= $(OSTYPE
)_
$(PTLIB_ALT
)_
$(MACHTYPE
)
899 OBJDIR_SUFFIX
= $(OBJ_SUFFIX
)
906 ifeq ($(P_SHAREDLIB
),1)
907 LIB_SUFFIX
= $(SHAREDLIBEXT
)
915 INSTALL_DIR
= /usr
/local
918 ifndef INSTALLBIN_DIR
919 INSTALLBIN_DIR
= $(INSTALL_DIR
)/bin
922 ifndef INSTALLLIB_DIR
923 INSTALLLIB_DIR
= $(INSTALL_DIR
)/lib
927 ###############################################################################
929 # define some common stuff
936 # Required macro symbols
941 UNIX_INC_DIR
= $(PREFIX
)/include/ptlib
/unix
943 UNIX_INC_DIR
= $(PWLIBDIR
)/include/ptlib
/unix
947 UNIX_SRC_DIR
= $(PWLIBDIR
)/src
/ptlib
/unix
950 PW_LIBDIR
= $(PWLIBDIR
)/lib
952 # set name of the PT library
953 PTLIB_BASE
= pt_
$(PLATFORM_TYPE
)_
$(OBJ_SUFFIX
)
954 PTLIB_FILE
= lib
$(PTLIB_BASE
)$(LIB_TYPE
).
$(LIB_SUFFIX
)
955 PT_OBJBASE
= obj_
$(PLATFORM_TYPE
)_
$(OBJDIR_SUFFIX
)
956 PT_OBJDIR
= $(PW_LIBDIR
)/$(PT_OBJBASE
)
958 # set name of the PW library (may not be used)
959 PWLIB_BASE
= pw_
$(GUI_TYPE
)_
$(PLATFORM_TYPE
)_
$(OBJ_SUFFIX
)
960 PWLIB_FILE
= lib
$(PWLIB_BASE
)$(LIB_TYPE
).
$(LIB_SUFFIX
)
961 PW_OBJBASE
= obj_
$(GUI_TYPE
)_
$(PLATFORM_TYPE
)_
$(OBJDIR_SUFFIX
)
962 PW_OBJDIR
= $(PW_LIBDIR
)/$(PW_OBJBASE
)
964 ###############################################################################
966 # Set up compiler flags and macros for debug/release versions
975 STDCCFLAGS
+= $(DEBUG_FLAG
) -D_DEBUG
976 LDFLAGS
+= $(DEBLDFLAGS
)
980 STDCCFLAGS
+= -DNDEBUG
982 ifneq ($(OSTYPE
),Darwin
)
983 ifeq ($(OSTYPE
),solaris
)
994 # define ESDDIR variables if installed
996 STDCCFLAGS
+= -I
$(ESDDIR
)/include -DUSE_ESD
=1
997 ENDLDLIBS
+= $(ESDDIR
)/lib
/libesd.a
# to avoid name conflicts
1001 # feature migrated to configure.in
1002 # #define templates if available
1003 # ifndef NO_PWLIB_TEMPLATES
1004 # STDCCFLAGS += -DPHAS_TEMPLATES
1007 # compiler flags for all modes
1008 #STDCCFLAGS += -fomit-frame-pointer
1009 #STDCCFLAGS += -fno-default-inline
1010 #STDCCFLAGS += -Woverloaded-virtual
1011 #STDCCFLAGS += -fno-implement-inlines
1013 # add OS directory to include path
1014 # STDCCFLAGS += -I$(UNIX_INC_DIR) # removed CRS
1017 # add library directory to library path and include the library
1018 LDFLAGS
+= -L
$(PW_LIBDIR
)
1020 LDLIBS
+= -l
$(PTLIB_BASE
)$(LIB_TYPE
)