Parameterize LIBRARY_DEST, PROGRAM_DEST, etc
[dyninst.git] / nmake.config
1 # Paradyn overall build configuration (Windows/NT)
2 #
3 # $Id: nmake.config,v 1.6 1998/03/02 00:42:11 wylie Exp $
4 #
5
6 AR              = ar
7 AS              =
8 CC              = cl -nologo
9 CXX             = cl -nologo
10 LEX             = p:\paradyn\packages\winnt\bin\flex
11 RANLIB          =
12 YFLAGS          = -d -y
13 YACC            = p:\paradyn\packages\winnt\bin\bison
14 CP              = copy
15 MV              = move
16 RM              = rm -f
17 MKDIR           = mkdir
18 # COLLECTOR is only used by purify & quantify
19 #COLLECTOR       = /s/gcc-2.7.1/bin/../lib/gcc-lib/$(PLATFORM)/2.7.1/ld
20 COLLECTOR       =
21
22 ARCH_DEF        = -Di386_unknown_nt4_0
23
24 #LDFLAGS                = -link
25
26 # most "main" modules are only two levels deep, but we need to be able to
27 # change this for those that are deeper in the tree
28 !ifndef TO_CORE
29 TO_CORE         = ..\..
30 !endif
31
32 # Default destinations for library and executable installation
33 LIBRARY_DEST  = $(TO_CORE)\..\lib\$(PLATFORM)
34 PROGRAM_DEST  = $(TO_CORE)\..\bin\$(PLATFORM)
35
36 # Usually, we look for files, binaries, libs in $(TO_CORE)/....<something>.
37 # But if the file doesn't exist there (i.e. if the user hasn't checked them out
38 # with cvs), then we should look in a backup location.  That's what this vrble
39 # is about.  It's used several times below in this file.
40 #BACKUP_CORE = p:\paradyn\core
41
42 # Default module compiler; modules which want $(CC) should redefine
43 # this, **NOT** CC
44
45 MODCC           = $(CXX)
46 MODCFLAGS       = $(CXXFLAGS)
47
48 #.SUFFIXES:      .I
49
50 #VPATH         = ../src:$(TO_CORE)/../lib/$(PLATFORM):/p/paradyn/lib/$(PLATFORM)
51 VPATH         = ..\src:$(TO_CORE)\..\lib\$(PLATFORM)
52
53 IFLAGS          = -I. -I$(TO_CORE) -Ip:/paradyn/packages/winnt/oncrpc/
54
55 #ASFLAGS         = -P $(ARCH_DEF)
56
57 #don't inline -- for the files that won't emit template code
58 INLINE_DEFINES = 
59
60 #inline the private members of the class -- templates.o can use this
61 TEMP_INLINE_DEFINES = -DDO_INLINE_P="inline"
62
63 # inline everything -- the way things should be
64 ALL_INLINE_DEFINES = -DDO_INLINE_F="inline" -DDO_INLINE_P="inline"
65
66
67 DEFCFLAGS       = -Z7 -W3
68
69 CFLAGS          = $(DEFCFLAGS) $(IFLAGS) $(ARCH_DEF)
70
71 CXXFLAGS        = $(DEFCFLAGS) -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -TP -DWIN32 $(IFLAGS) $(ARCH_DEF)
72  
73 # flags for kludge files, won't have warnings generated
74 KFLAGS          = $(IFLAGS) $(ARCH_DEF)
75
76 # flags for template files, don't define external template flags
77 # -g is optional in this case -- should be defined at module level
78 TFLAGS          = $(IFLAGS) $(TEMP_INLINE_DEFINES) $(ARCH_DEF)
79
80 !ifdef DO_INLINE_ALL
81 CXXFLAGS        = $(CXXFLAGS) -DDO_INLINE_F="inline" -DDO_INLINE_P="inline"
82 !endif
83
84 # Start off LIBDIR to point to the user's devel area's paradyn lib directory.
85 # As a backup, in case the user hasn't checked out & compiled some paradyn lib,
86 # we stick in /p/paradyn/lib _second_.
87 LIBDIR          = -LIBPATH:$(LIBRARY_DEST) \
88                         -LIBPATH:$(BACKUP_CORE)\..\lib\$(PLATFORM) \
89                         -LIBPATH:p:\paradyn\packages\winnt\oncrpc\lib\
90
91 # Set IGEN to point to $(TO_CORE)/../bin/$(PLATFORM)/igen, if it exists,
92 # else set it to $(BACKUP_CORE)/../bin/$(PLATFORM)/igen, if it exists,
93 # else set it to just "igen" (i.e. assume it's in the user's path)
94 IGEN = $(TO_CORE)\igen\$(PLATFORM) 
95
96 !ifdef NO_IMPLICIT_TEMPLATES
97 #CFLAGS          += -fno-implicit-templates
98 #CXXFLAGS        += -fno-implicit-templates
99 #KFLAGS          += -fno-implicit-templates
100 #TFLAGS          += -fno-implicit-templates
101 !endif
102
103 !ifndef INSTANTIATE_TEMPLATES
104 !ifndef NO_IMPLICIT_TEMPLATES
105 # -fexternal-templates and -Dexternal_templates should both be used or
106 # neither should be used; add them to CFLAGS, CXXFLAGS, and KFLAGS
107 # (but not to TFLAGS).
108 #
109 #CFLAGS          = $(CFLAGS) -fexternal-templates -Dexternal_templates
110 #CXXFLAGS        = $(CXXFLAGS) -fexternal-templates -Dexternal_templates
111 #KFLAGS          = $(KFLAGS) -fexternal-templates -Dexternal_templates
112 !endif
113 !endif
114
115 !ifdef USES_PVM
116 PVM_DIR         = $(PVM_ROOT)/lib/$(PVM_ARCH)
117 IFLAGS          = $(IFLAGS) -I$(PVM_ROOT)/include
118 #LIBDIR          += $(patsubst %,-L%,$(PVM_DIR))
119 #VPATH           += $(PVM_DIR)
120 !endif
121
122 !ifdef USES_TCLTK
123 # Set TCL2C to $(TO_CORE)/tclStuff/tcl2c, if it exists, else
124 # set it to $(BACKUP_CORE)/tclStuff/tcl2c, if it exists, else
125 # set it to just tcl2c (i.e. assume it's in the user's shell path)
126 TCL2C           = $(shell if [ -f $(TO_CORE)/tclStuff/tcl2c ]; then echo $(TO_CORE)/tclStuff/tcl2c; else if [ -f $(BACKUP_CORE)/tclStuff/tcl2c ]; then echo $(BACKUP_CORE)/tclStuff/tcl2c; else echo tcl2c; fi; fi )
127 TCL2C_GEN_SRCS  = tcl2c.C
128
129 # Set TCLTK_INCLUDES to $(TO_CORE)/tclStuff/include, if it exists,
130 # else set it to $(BACKUP_CORE)/tclStuff/include.
131 TCLTK_INCLUDES  = $(shell if [ -d $(TO_CORE)/tclStuff/include ]; then echo $(TO_CORE)/tclStuff/include; else echo $(BACKUP_CORE)/tclStuff/include; fi )
132
133 TCLTK_LIBS      = /p/paradyn/packages/tcl7.5
134
135 IFLAGS          += $(patsubst %,-I%,$(TCLTK_INCLUDES))
136 LIBDIR          += $(patsubst %,-L%/lib,$(TCLTK_LIBS))
137 !endif
138
139 #ifdef USES_FLEX
140 #FLEX_DIR        = p:\paradyn\packages\winnt\bin\flex
141 #LIBDIR          += $(patsubst %,-L%,$(FLEX_DIR))
142 #VPATH           = $(VPATH) $(FLEX_DIR)
143 #endif
144
145 #ifdef USES_LIBERTY
146 # Since libiberty.a is in the same g++ directory as libstdc++.a and
147 # libg++.a, no need for a "-L$(LIBERTY_DIR)" entry -at
148 #endif
149
150 #ifdef USES_X11
151 #ifeq ($(PLATFORM),sparc-sun-solaris2.4)
152 #CFLAGS          += -I/usr/openwin/include
153 #CXXFLAGS        += -I/usr/openwin/include
154 #TFLAGS          += -I/usr/openwin/include
155 #LIBDIR          += -R/usr/openwin/lib -L/usr/openwin/lib
156 #VPATH           += /usr/openwin/lib
157 #endif
158
159 #ifeq ($(PLATFORM),i386-unknown-solaris2.5)
160 #CFLAGS          += -I/usr/openwin/include
161 #CXXFLAGS        += -I/usr/openwin/include
162 #TFLAGS          += -I/usr/openwin/include
163 #LIBDIR          += -R/usr/openwin/lib -L/usr/openwin/lib
164 #VPATH           += /usr/openwin/lib
165 #endif
166
167 #endif
168
169
170 # Include any per-user configuration changes; this "local" config file
171 # should *not* be under CVS control, so that it never gets committed.
172
173 #!include $(TO_CORE)/make.config.local
174
175