[6] | 1 | # FileName [ Makefile.in ] |
---|
| 2 | # |
---|
| 3 | # PackageName [ glu ] |
---|
| 4 | # |
---|
| 5 | # Synopsis [ Package-wide Makefile ] |
---|
| 6 | # |
---|
| 7 | # Description [ This file requires GNU's make program. |
---|
| 8 | # Run "configure" to generate the Makefile, or use |
---|
| 9 | # "config.status" (created by configure) to regenerate the |
---|
| 10 | # Makefile after modifying this file. |
---|
| 11 | # |
---|
| 12 | # Type "gmake help" for a list of valid targets. ] |
---|
| 13 | # |
---|
| 14 | # SeeAlso [ configure.in ] |
---|
| 15 | # |
---|
| 16 | # Author [ Stephen Edwards <sedwards@eecs.berkeley.edu> ] |
---|
| 17 | # |
---|
| 18 | # Copyright [ |
---|
| 19 | # Copyright (c) 1994-1998 The Regents of the Univ. of California. |
---|
| 20 | # All rights reserved. |
---|
| 21 | # |
---|
| 22 | # Permission is hereby granted, without written agreement and without license |
---|
| 23 | # or royalty fees, to use, copy, modify, and distribute this software and its |
---|
| 24 | # documentation for any purpose, provided that the above copyright notice and |
---|
| 25 | # the following two paragraphs appear in all copies of this software. |
---|
| 26 | # |
---|
| 27 | # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR |
---|
| 28 | # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT |
---|
| 29 | # OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF |
---|
| 30 | # CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
| 31 | # |
---|
| 32 | # THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, |
---|
| 33 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND |
---|
| 34 | # FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN |
---|
| 35 | # "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE |
---|
| 36 | # MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
---|
| 37 | # ] |
---|
| 38 | # |
---|
| 39 | # Revision [$Id: Makefile.in,v 1.60 2005/05/15 05:43:36 fabio Exp $] |
---|
| 40 | |
---|
| 41 | # Default target: |
---|
| 42 | |
---|
| 43 | .PHONY : default |
---|
| 44 | |
---|
| 45 | default : all |
---|
| 46 | |
---|
| 47 | #---------------------------------------------------------------------- |
---|
| 48 | # Lists of packages to compile. Change this if you are only compiling |
---|
| 49 | # part of GLU |
---|
| 50 | #---------------------------------------------------------------------- |
---|
| 51 | |
---|
| 52 | #PKGS = array |
---|
| 53 | PKGS = $(ALL_BASIC_PKGS) |
---|
| 54 | |
---|
| 55 | #BDD_PKGS = cmu |
---|
| 56 | BDD_PKGS = $(ALL_BDD_PKGS) |
---|
| 57 | |
---|
| 58 | #MDD_PKGS = |
---|
| 59 | MDD_PKGS = $(ALL_MDD_PKGS) |
---|
| 60 | |
---|
| 61 | #---------------------------------------------------------------------- |
---|
| 62 | # This Makefile is designed for three different situations: |
---|
| 63 | # |
---|
| 64 | # 1. Single platform build (the default) |
---|
| 65 | # |
---|
| 66 | # All packages listed in the PKGS variable |
---|
| 67 | # local_srcdir = master_srcdir = . |
---|
| 68 | # |
---|
| 69 | # 2. Multi-platform build |
---|
| 70 | # |
---|
| 71 | # All packages listed in the PKGS variable |
---|
| 72 | # local_srcdir = master_srcdir = /where/source/files/reside |
---|
| 73 | # |
---|
| 74 | # 3. Multi-platform development (used at Berkeley) |
---|
| 75 | # |
---|
| 76 | # Packages under development listed in the PKGS variable |
---|
| 77 | # local_srcdir = ../common |
---|
| 78 | # master_srcdir = /projects/glu/glu-devel/common |
---|
| 79 | # |
---|
| 80 | # User has a directory structure that looks like |
---|
| 81 | # |
---|
| 82 | # glu/common/src/ Subdirectory with package source files |
---|
| 83 | # under development. |
---|
| 84 | # |
---|
| 85 | # glu/$PLATFORM/ Subdirectory with this Makefile. |
---|
| 86 | # Compilation is invoked here. |
---|
| 87 | # |
---|
| 88 | # $PLATFORM is something like "alpha-g" (DEC Alpha, debug version) |
---|
| 89 | # |
---|
| 90 | #---------------------------------------------------------------------- |
---|
| 91 | |
---|
| 92 | #---------------------------------------------------------------------- |
---|
| 93 | # Information about all the packages |
---|
| 94 | #---------------------------------------------------------------------- |
---|
| 95 | |
---|
| 96 | # Note: To add another BDD package, add it to this list and add a rule |
---|
| 97 | # of the form libbdd.a (see the existing ones for an example) |
---|
| 98 | |
---|
| 99 | ALL_BASIC_PKGS = array avl bdd epd error graph heap list mem mtr sparse st \ |
---|
| 100 | util var_set |
---|
| 101 | ALL_BDD_PKGS = cal cu cmu |
---|
| 102 | ALL_MDD_PKGS = mdd |
---|
| 103 | |
---|
| 104 | # Generate the list of all packages NOT in the PKGS list |
---|
| 105 | |
---|
| 106 | MISSING_PKGS = $(filter-out $(PKGS), $(ALL_BASIC_PKGS)) |
---|
| 107 | MISSING_BDD_PKGS = $(filter-out $(BDD_PKGS), $(ALL_BDD_PKGS)) |
---|
| 108 | MISSING_MDD_PKGS = $(filter-out $(MDD_PKGS), $(ALL_MDD_PKGS)) |
---|
| 109 | |
---|
| 110 | FULL_PKGS = $(PKGS) $(foreach bdd, $(BDD_PKGS), $(bdd)Bdd $(bdd)Port) \ |
---|
| 111 | $(MDD_PKGS) |
---|
| 112 | FULL_MISSING_PKGS = $(MISSING_PKGS) \ |
---|
| 113 | $(foreach bdd, $(MISSING_BDD_PKGS), $(bdd)Bdd $(bdd)Port) \ |
---|
| 114 | $(MISSING_MDD_PKGS) |
---|
| 115 | |
---|
| 116 | #---------------------------------------------------------------------- |
---|
| 117 | # For safety |
---|
| 118 | #---------------------------------------------------------------------- |
---|
| 119 | |
---|
| 120 | SHELL = /bin/sh |
---|
| 121 | .SUFFIXES: |
---|
| 122 | |
---|
| 123 | #---------------------------------------------------------------------- |
---|
| 124 | # The name of the product and its version |
---|
| 125 | #---------------------------------------------------------------------- |
---|
| 126 | |
---|
| 127 | PRODUCT = glu |
---|
| 128 | VERSION = 2.1 |
---|
| 129 | |
---|
| 130 | #---------------------------------------------------------------------- |
---|
| 131 | # Source directories |
---|
| 132 | #---------------------------------------------------------------------- |
---|
| 133 | |
---|
| 134 | # Directory containing master source files. This directory is searched |
---|
| 135 | # for packages NOT listed in the PKGS variable. Defaults to "." |
---|
| 136 | # Override with ./configure --srcdir= |
---|
| 137 | master_srcdir = @srcdir@ |
---|
| 138 | |
---|
| 139 | # Directory containing local source files. This directory is searched |
---|
| 140 | # for packages listed in the PKGS variable. Defaults to the master source |
---|
| 141 | # directory (see above). |
---|
| 142 | # Override with ./configure --with-local-srcdir= |
---|
| 143 | local_srcdir = @local_srcdir@ |
---|
| 144 | |
---|
| 145 | #---------------------------------------------------------------------- |
---|
| 146 | # Directories used while building |
---|
| 147 | #---------------------------------------------------------------------- |
---|
| 148 | |
---|
| 149 | # Directory where object files will be placed during the build |
---|
| 150 | objectdir = obj |
---|
| 151 | |
---|
| 152 | # Directory where links to header files will be placed during the build |
---|
| 153 | headerdir = $(local_srcdir)/include |
---|
| 154 | |
---|
| 155 | #---------------------------------------------------------------------- |
---|
| 156 | # Installation names and directories |
---|
| 157 | #---------------------------------------------------------------------- |
---|
| 158 | |
---|
| 159 | # Name of the library to create |
---|
| 160 | LIBRARY = lib$(PRODUCT).a |
---|
| 161 | |
---|
| 162 | # Names of the BDD libraries to create |
---|
| 163 | BDD_LIBRARIES = $(foreach bdd, $(BDD_PKGS), lib$(bdd).a) |
---|
| 164 | |
---|
| 165 | # Directory in which to install architecture-independent files |
---|
| 166 | # Set by ./configure --prefix=... |
---|
| 167 | prefix = @prefix@ |
---|
| 168 | |
---|
| 169 | # Directory in which to install architecture-dependent files |
---|
| 170 | # Set by ./configure --exec-prefix=... |
---|
| 171 | exec_prefix = @exec_prefix@ |
---|
| 172 | |
---|
| 173 | # Directory in which to install libraries |
---|
| 174 | libdir = $(exec_prefix)/lib |
---|
| 175 | |
---|
| 176 | # Directory in which to install headers |
---|
| 177 | includedir = $(prefix)/include |
---|
| 178 | |
---|
| 179 | #---------------------------------------------------------------------- |
---|
| 180 | # The following are set by the configure script |
---|
| 181 | #---------------------------------------------------------------------- |
---|
| 182 | |
---|
| 183 | AC_FLAGS = @DEFS@ |
---|
| 184 | RANLIB = @RANLIB@ |
---|
| 185 | AR = @AR@ |
---|
| 186 | CC = @CC@ |
---|
| 187 | CFLAGS = @CFLAGS@ |
---|
| 188 | INSTALL = @INSTALL@ |
---|
| 189 | INSTALL_DATA = @INSTALL_DATA@ |
---|
| 190 | |
---|
| 191 | #---------------------------------------------------------------------- |
---|
| 192 | # Include the make templates from all the packages |
---|
| 193 | # |
---|
| 194 | # Each of these templates (e.g., array/array.make) should contains lines |
---|
| 195 | # of the form |
---|
| 196 | # |
---|
| 197 | # CSRC += source1.c source2.c |
---|
| 198 | # HEADERS += header1.h header2.h |
---|
| 199 | # MISC += misc1 misc2 |
---|
| 200 | # |
---|
| 201 | # For BDD packages (both Port and Bdd), these should be, e.g., |
---|
| 202 | # |
---|
| 203 | # CSRC_cmu += source1.c source2.c |
---|
| 204 | # HEADERS_cmu += header1.h |
---|
| 205 | # |
---|
| 206 | # For the MDD package the definition is |
---|
| 207 | # |
---|
| 208 | # CSRC_mdd = source1.c source2.c |
---|
| 209 | # HEADERS_mdd = header1.h |
---|
| 210 | # MISC += misc1 misc2 |
---|
| 211 | #---------------------------------------------------------------------- |
---|
| 212 | |
---|
| 213 | MAKEINCLUDES = \ |
---|
| 214 | $(foreach package, $(FULL_PKGS), \ |
---|
| 215 | $(local_srcdir)/src/$(package)/$(package).make ) |
---|
| 216 | |
---|
| 217 | include $(MAKEINCLUDES) |
---|
| 218 | |
---|
| 219 | OBJECTS = $(addprefix $(objectdir)/,$(CSRC:.c=.o)) |
---|
| 220 | |
---|
| 221 | # Collect the names of all the bdd package source files |
---|
| 222 | BDD_CSRC = $(foreach bdd_package, $(BDD_PKGS), $(CSRC_$(bdd_package))) |
---|
| 223 | BDD_HEADERS = $(foreach bdd_package, $(BDD_PKGS), $(HEADERS_$(bdd_package))) |
---|
| 224 | BDD_OBJECTS = $(addprefix $(objectdir)/,$(BDD_CSRC:.c=.o)) |
---|
| 225 | |
---|
| 226 | CAL_OBJECTS = $(addprefix $(objectdir)/,$(CSRC_cal:.c=.o)) |
---|
| 227 | CMU_OBJECTS = $(addprefix $(objectdir)/,$(CSRC_cmu:.c=.o)) |
---|
| 228 | CU_OBJECTS = $(addprefix $(objectdir)/,$(CSRC_cu:.c=.o)) |
---|
| 229 | |
---|
| 230 | # Save the names of the mdd package source files |
---|
| 231 | MDD_CSRC = $(CSRC_mdd) |
---|
| 232 | MDD_HEADERS = $(HEADERS_mdd) $(BDD_HEADERS) |
---|
| 233 | MDD_OBJECTS = $(addprefix $(objectdir)/,$(CSRC_mdd:.c=.o)) |
---|
| 234 | |
---|
| 235 | #---------------------------------------------------------------------- |
---|
| 236 | # Include the dependency files from each package directory. |
---|
| 237 | # A missing dependency file does not produce an error. |
---|
| 238 | #---------------------------------------------------------------------- |
---|
| 239 | |
---|
| 240 | DEPENDENCIES = $(foreach package, $(PKGS) $(MDD_PKGS) \ |
---|
| 241 | $(foreach bdd, $(BDD_PKGS), $(bdd)Bdd $(bdd)Port), \ |
---|
| 242 | $(local_srcdir)/src/$(package)/$(package).d) |
---|
| 243 | |
---|
| 244 | -include $(DEPENDENCIES) |
---|
| 245 | |
---|
| 246 | #---------------------------------------------------------------------- |
---|
| 247 | # Form the the list of directories to search for header files. |
---|
| 248 | # |
---|
| 249 | # INCLUDEDIRS looks like "-I/projects/glu/ -I/projects/vis/ ..." |
---|
| 250 | #---------------------------------------------------------------------- |
---|
| 251 | |
---|
| 252 | INCLUDEDIRS = \ |
---|
| 253 | $(foreach package, $(FULL_PKGS), \ |
---|
| 254 | -I$(local_srcdir)/src/$(package) ) \ |
---|
| 255 | $(foreach package, $(FULL_MISSING_PKGS), \ |
---|
| 256 | -I$(master_srcdir)/src/$(package) ) \ |
---|
| 257 | -I$(objectdir) |
---|
| 258 | |
---|
| 259 | #---------------------------------------------------------------------- |
---|
| 260 | # Form the list of directories to search for files listed in make rules. |
---|
| 261 | # |
---|
| 262 | # VPATH looks like /projects/vis:/projects/glu/: ... |
---|
| 263 | #---------------------------------------------------------------------- |
---|
| 264 | |
---|
| 265 | VPATH = $(local_srcdir): \ |
---|
| 266 | $(master_srcdir): \ |
---|
| 267 | $(addprefix :$(local_srcdir)/src/,$(FULL_PKGS)): \ |
---|
| 268 | $(addprefix :$(master_srcdir)/src/,$(FULL_MISSING_PKGS)): \ |
---|
| 269 | $(objectdir) |
---|
| 270 | |
---|
| 271 | #---------------------------------------------------------------------- |
---|
| 272 | # Definitions for the distribution file |
---|
| 273 | #---------------------------------------------------------------------- |
---|
| 274 | |
---|
| 275 | DISTRIBUTION = $(PRODUCT)-$(VERSION) |
---|
| 276 | |
---|
| 277 | # Directories to include in the distribution file |
---|
| 278 | |
---|
| 279 | DISTDIRS = src obj $(addprefix src/,$(FULL_PKGS)) src/cuBdd/doc \ |
---|
| 280 | helpers src/cuBdd/doc/icons |
---|
| 281 | |
---|
| 282 | # Build/install helper files |
---|
| 283 | |
---|
| 284 | HELPERS = $(addprefix helpers/, \ |
---|
| 285 | install-sh mkinstalldirs config.guess config.sub dependency.make) |
---|
| 286 | |
---|
| 287 | # Files to include in the distribution file |
---|
| 288 | |
---|
| 289 | DISTFILES = \ |
---|
| 290 | README INSTALL NEWS \ |
---|
| 291 | configure configure.in Makefile.in $(HELPERS) \ |
---|
| 292 | $(CSRC) $(BDD_CSRC) $(MDD_CSRC) $(HEADERS) $(BDD_HEADERS) \ |
---|
| 293 | $(MDD_HEADERS) $(MAKEINCLUDES) \ |
---|
| 294 | $(MISC) |
---|
| 295 | |
---|
| 296 | #---------------------------------------------------------------------- |
---|
| 297 | # Variables used by for Revision Control |
---|
| 298 | #---------------------------------------------------------------------- |
---|
| 299 | |
---|
| 300 | # The root RCS directory |
---|
| 301 | rcs_rootdir = /projects/glu/rcsRoot/common |
---|
| 302 | |
---|
| 303 | RCSFILES = $(CSRC) $(BDD_CSRC) $(MDD_CSRC) $(HEADERS) $(BDD_HEADERS) \ |
---|
| 304 | $(MDD_HEADERS) $(MISC) $(MAKEINCLUDES) |
---|
| 305 | |
---|
| 306 | RCSMISCFILES = README INSTALL NEWS Makefile.in configure.in localconfigure \ |
---|
| 307 | masterconfigure $(HELPERS) |
---|
| 308 | |
---|
| 309 | #---------------------------------------------------------------------- |
---|
| 310 | # Implicit rules for compiling and archiving |
---|
| 311 | #---------------------------------------------------------------------- |
---|
| 312 | |
---|
| 313 | # For compiling a source file into the object directory |
---|
| 314 | |
---|
| 315 | $(objectdir)/%.o : %.c |
---|
| 316 | umask 2; $(CC) -c $(CFLAGS) $(AC_FLAGS) $(INCLUDEDIRS) -o $@ $< |
---|
| 317 | |
---|
| 318 | # Place object files into an archive |
---|
| 319 | |
---|
| 320 | %.a : |
---|
| 321 | rm -f $@ |
---|
| 322 | umask 2; $(AR) cq $@ $^ |
---|
| 323 | $(RANLIB) $@ |
---|
| 324 | |
---|
| 325 | ###################################################################### |
---|
| 326 | # RULES # |
---|
| 327 | ###################################################################### |
---|
| 328 | |
---|
| 329 | #: |
---|
| 330 | #: Useful targets: |
---|
| 331 | #: |
---|
| 332 | |
---|
| 333 | #---------------------------------------------------------------------- |
---|
| 334 | # Rule for getting help |
---|
| 335 | #---------------------------------------------------------------------- |
---|
| 336 | |
---|
| 337 | .PHONY : help |
---|
| 338 | |
---|
| 339 | #: help -- Print a list of targets |
---|
| 340 | |
---|
| 341 | # This prints all lines in this Makefile that begin with #: |
---|
| 342 | |
---|
| 343 | help : |
---|
| 344 | @sed -n "s/^#://p" Makefile |
---|
| 345 | |
---|
| 346 | #---------------------------------------------------------------------- |
---|
| 347 | # Always executed once when the Makefile is run |
---|
| 348 | #---------------------------------------------------------------------- |
---|
| 349 | |
---|
| 350 | # Make sure the directory in which to place the objects exists |
---|
| 351 | |
---|
| 352 | ignored := $(shell umask 2; test -d $(objectdir) || mkdir $(objectdir)) |
---|
| 353 | |
---|
| 354 | #---------------------------------------------------------------------- |
---|
| 355 | # Rules to compile and build libraries |
---|
| 356 | #---------------------------------------------------------------------- |
---|
| 357 | |
---|
| 358 | .PHONY : all |
---|
| 359 | |
---|
| 360 | #: |
---|
| 361 | #: all (the default) -- Create the libraries |
---|
| 362 | |
---|
| 363 | all : $(headerdir) $(LIBRARY) $(BDD_LIBRARIES) |
---|
| 364 | |
---|
| 365 | $(LIBRARY) : $(OBJECTS) |
---|
| 366 | |
---|
| 367 | libcal.a : $(CAL_OBJECTS) $(MDD_OBJECTS) |
---|
| 368 | |
---|
| 369 | libcmu.a : $(CMU_OBJECTS) $(MDD_OBJECTS) |
---|
| 370 | |
---|
| 371 | libcu.a : $(CU_OBJECTS) $(MDD_OBJECTS) |
---|
| 372 | |
---|
| 373 | $(headerdir) : $(HEADERS) $(MDD_HEADERS) |
---|
| 374 | rm -rf $(headerdir) |
---|
| 375 | umask 2; mkdir $(headerdir) |
---|
| 376 | for header in $(HEADERS) $(MDD_HEADERS); do \ |
---|
| 377 | ln $(local_srcdir)/src/*/$$header $(headerdir)/$$header; \ |
---|
| 378 | done |
---|
| 379 | |
---|
| 380 | #---------------------------------------------------------------------- |
---|
| 381 | # Warts |
---|
| 382 | #---------------------------------------------------------------------- |
---|
| 383 | |
---|
| 384 | # Work around an optimizer bug in the native Ultrix compiler |
---|
| 385 | |
---|
| 386 | ifeq (@target@,mips-dec-ultrix4.5) |
---|
| 387 | $(objectdir)/calReduce.o : calReduce.c |
---|
| 388 | umask 2; $(CC) -c -std1 -g $(AC_FLAGS) $(INCLUDEDIRS) -o $@ $< |
---|
| 389 | endif |
---|
| 390 | |
---|
| 391 | # Work around a bug in gcc 2.7.0 |
---|
| 392 | |
---|
| 393 | ifeq ($(CC),gcc) |
---|
| 394 | ifeq ($(shell gcc --version),2.7.0) |
---|
| 395 | |
---|
| 396 | $(objectdir)/cal.o : cal.c |
---|
| 397 | umask 2; $(CC) -c -g $(AC_FLAGS) $(INCLUDEDIRS) -o $@ $< |
---|
| 398 | |
---|
| 399 | $(objectdir)/calBddSwapVars.o : calBddSwapVars.c |
---|
| 400 | umask 2; $(CC) -c -g $(AC_FLAGS) $(INCLUDEDIRS) -o $@ $< |
---|
| 401 | |
---|
| 402 | endif |
---|
| 403 | endif |
---|
| 404 | |
---|
| 405 | #---------------------------------------------------------------------- |
---|
| 406 | # Rules to build test programs |
---|
| 407 | #---------------------------------------------------------------------- |
---|
| 408 | |
---|
| 409 | .PHONY : check check-bdd check-cal check-cmu check-cu |
---|
| 410 | |
---|
| 411 | #: |
---|
| 412 | #: check -- Test the libraries (runs check-bdd) |
---|
| 413 | |
---|
| 414 | check : check-bdd |
---|
| 415 | |
---|
| 416 | #: check-bdd -- Compile simple test programs for each of the BDD packages |
---|
| 417 | #: and run them |
---|
| 418 | |
---|
| 419 | check-bdd : check-cmu check-cal check-cu |
---|
| 420 | |
---|
| 421 | check-cal : obj/checkcal |
---|
| 422 | obj/checkcal > checkcal.out |
---|
| 423 | @echo "Test appears successful -- results in checkcal.out" |
---|
| 424 | |
---|
| 425 | obj/checkcal : libcal.a calTest.c |
---|
| 426 | $(CC) -o obj/checkcal -DTEST $(CFLAGS) $(AC_FLAGS) $(INCLUDEDIRS) \ |
---|
| 427 | $(filter %.c, $^) -L. -lcal |
---|
| 428 | |
---|
| 429 | check-cmu : obj/checkcmu |
---|
| 430 | obj/checkcmu > checkcmu.out |
---|
| 431 | @echo "Test appears successful -- results in checkcmu.out" |
---|
| 432 | |
---|
| 433 | obj/checkcmu : libcmu.a $(LIBRARY) testbdd.c |
---|
| 434 | $(CC) -o obj/checkcmu $(CFLAGS) $(AC_FLAGS) $(INCLUDEDIRS) \ |
---|
| 435 | $(filter %.c, $^) -L. -lcmu -l$(PRODUCT) |
---|
| 436 | |
---|
| 437 | check-cu : obj/checkcu src/cuBdd/r7x8.1.mat |
---|
| 438 | obj/checkcu -p 2 $(filter %.mat, $^) > checkcu.out |
---|
| 439 | @echo "Test appears successful -- results in checkcu.out" |
---|
| 440 | |
---|
| 441 | obj/checkcu : libcu.a $(LIBRARY) testcudd.c |
---|
| 442 | $(CC) -o obj/checkcu $(CFLAGS) $(AC_FLAGS) $(INCLUDEDIRS) \ |
---|
| 443 | $(filter %.c, $^) -L. -lcu -l$(PRODUCT) -lm |
---|
| 444 | |
---|
| 445 | #---------------------------------------------------------------------- |
---|
| 446 | # Rules that produce/delete the dependency file for every package |
---|
| 447 | #---------------------------------------------------------------------- |
---|
| 448 | |
---|
| 449 | .PHONY : dependencies cleandependencies |
---|
| 450 | |
---|
| 451 | #: |
---|
| 452 | #: dependencies -- Create a list of dependency files. |
---|
| 453 | #: Useful when modifying header files. |
---|
| 454 | |
---|
| 455 | # Invoke the "dependency.make" Makefile on each package subdirectory, |
---|
| 456 | # passing the path, etc. to it. |
---|
| 457 | # |
---|
| 458 | # There's a strange feature in autoconf where lines of the form " VPATH=" |
---|
| 459 | # are removed from the Makefile. Thus, a flag is placed before the |
---|
| 460 | # VPATH= argument below. |
---|
| 461 | |
---|
| 462 | dependencies: |
---|
| 463 | ifneq ($(findstring <$(CC)>,<gcc> <g++>),) |
---|
| 464 | for pkg in $(PKGS) $(foreach bdd, $(BDD_PKGS), $(bdd)Bdd $(bdd)Port) \ |
---|
| 465 | $(MDD_PKGS) ; do \ |
---|
| 466 | $(MAKE) --no-print-directory \ |
---|
| 467 | -f $(master_srcdir)/helpers/dependency.make \ |
---|
| 468 | CC="$(CC)" \ |
---|
| 469 | CFLAGS="$(CFLAGS)" VPATH="$(local_srcdir)/src/$$pkg" \ |
---|
| 470 | AC_FLAGS="$(AC_FLAGS)" \ |
---|
| 471 | INCLUDEDIRS="$(INCLUDEDIRS)" objectdir=$(objectdir) \ |
---|
| 472 | PKGNAME=$(local_srcdir)/src/$$pkg/$$pkg \ |
---|
| 473 | $(local_srcdir)/src/$$pkg/$$pkg.d ; \ |
---|
| 474 | done |
---|
| 475 | else |
---|
| 476 | @echo "dependency requires gcc or g++" |
---|
| 477 | @echo "Reconfigure with gcc or g++" |
---|
| 478 | endif |
---|
| 479 | |
---|
| 480 | cleandependencies: |
---|
| 481 | rm -f $(local_srcdir)/src/*/*.d |
---|
| 482 | |
---|
| 483 | #---------------------------------------------------------------------- |
---|
| 484 | # Rules for installation |
---|
| 485 | #---------------------------------------------------------------------- |
---|
| 486 | |
---|
| 487 | .PHONY : install uninstall installdirs |
---|
| 488 | |
---|
| 489 | #: |
---|
| 490 | #: install -- Install the libraries and headers in libdir and includedir |
---|
| 491 | |
---|
| 492 | install : $(LIBRARY) $(BDD_LIBRARIES) installdirs |
---|
| 493 | @if [ ! -f $(libdir)/$(LIBRARY) ] ; \ |
---|
| 494 | then \ |
---|
| 495 | echo "Installing $(libdir)/$(LIBRARY)"; \ |
---|
| 496 | $(INSTALL_DATA) $(LIBRARY) $(libdir)/$(LIBRARY); \ |
---|
| 497 | else \ |
---|
| 498 | echo "Warning: $(libdir)/$(LIBRARY) already exists" ; \ |
---|
| 499 | fi |
---|
| 500 | @for lib in $(BDD_LIBRARIES); do \ |
---|
| 501 | if [ ! -f $(libdir)/$$lib ] ; \ |
---|
| 502 | then \ |
---|
| 503 | echo "Installing $(libdir)/$$lib"; \ |
---|
| 504 | $(INSTALL_DATA) $$lib $(libdir)/$$lib; \ |
---|
| 505 | else \ |
---|
| 506 | echo "Warning: $(libdir)/$$lib already exists" ; \ |
---|
| 507 | fi ; \ |
---|
| 508 | done |
---|
| 509 | @for header in $(HEADERS) $(MDD_HEADERS); do \ |
---|
| 510 | if [ ! -f $(includedir)/$$header ] ; \ |
---|
| 511 | then \ |
---|
| 512 | echo "Installing $(includedir)/$$header"; \ |
---|
| 513 | $(INSTALL_DATA) $(master_srcdir)/src/*/$$header \ |
---|
| 514 | $(includedir)/$$header; \ |
---|
| 515 | else \ |
---|
| 516 | echo "Warning: $(includedir)/$$header already exists"; \ |
---|
| 517 | fi ; \ |
---|
| 518 | done |
---|
| 519 | |
---|
| 520 | #: uninstall -- Reverse the effects of "install" |
---|
| 521 | |
---|
| 522 | uninstall : |
---|
| 523 | rm -f $(libdir)/$(LIBRARY) $(addprefix $(libdir)/, $(BDD_LIBRARIES)) |
---|
| 524 | @for header in $(HEADERS) $(MDD_HEADERS); do \ |
---|
| 525 | echo "Removing $(includedir)/$$header"; \ |
---|
| 526 | rm -f $(includedir)/$$header; \ |
---|
| 527 | done |
---|
| 528 | |
---|
| 529 | installdirs : |
---|
| 530 | $(master_srcdir)/helpers/mkinstalldirs $(libdir) $(includedir) |
---|
| 531 | |
---|
| 532 | #---------------------------------------------------------------------- |
---|
| 533 | # Rules for making a distribution file |
---|
| 534 | # This only works when ALL of the packages are considered "local" |
---|
| 535 | #---------------------------------------------------------------------- |
---|
| 536 | |
---|
| 537 | .PHONY : dist |
---|
| 538 | |
---|
| 539 | #: |
---|
| 540 | #: dist -- Create a tarred, gzipped distribution file |
---|
| 541 | |
---|
| 542 | # Warning: "tar" under Digital Unix (on DEC Alphas) writes directories |
---|
| 543 | # that don't work under SunOS tar |
---|
| 544 | |
---|
| 545 | dist : $(DISTRIBUTION).tar.gz |
---|
| 546 | |
---|
| 547 | $(DISTRIBUTION).tar.gz : $(DISTFILES) |
---|
| 548 | ifeq ($(strip $(FULL_MISSING_PKGS)),) |
---|
| 549 | rm -rf $(DISTRIBUTION) |
---|
| 550 | umask 022; mkdir $(DISTRIBUTION) |
---|
| 551 | for dir in $(DISTDIRS); do \ |
---|
| 552 | umask 022; mkdir $(DISTRIBUTION)/$$dir; \ |
---|
| 553 | done |
---|
| 554 | @echo "Copying distribution files" |
---|
| 555 | @for file in $(patsubst $(local_srcdir)/%, %, $^); do \ |
---|
| 556 | echo " $$file"; \ |
---|
| 557 | cp -p $(local_srcdir)/$$file $(DISTRIBUTION)/$$file; \ |
---|
| 558 | done |
---|
| 559 | - chmod -R a+r $(DISTRIBUTION) |
---|
| 560 | - chmod -R u+w $(DISTRIBUTION) |
---|
| 561 | tar cf - $(DISTRIBUTION) | gzip -9 > $(DISTRIBUTION).tar.gz |
---|
| 562 | rm -rf $(DISTRIBUTION) |
---|
| 563 | else |
---|
| 564 | @echo "Missing packages: $(FULL_MISSING_PKGS)" |
---|
| 565 | @echo "Make sure PKGS, BDD_PKGS, and MDD_PKGS list all the packages" |
---|
| 566 | @exit 1 |
---|
| 567 | endif |
---|
| 568 | |
---|
| 569 | #---------------------------------------------------------------------- |
---|
| 570 | # Rules for rebuilding the configure file and Makefile |
---|
| 571 | #---------------------------------------------------------------------- |
---|
| 572 | |
---|
| 573 | ${master_srcdir}/configure : configure.in |
---|
| 574 | cd ${master_srcdir} && autoconf |
---|
| 575 | chmod -f 0775 ${master_srcdir}/config* |
---|
| 576 | |
---|
| 577 | config.status : configure |
---|
| 578 | ./config.status --recheck |
---|
| 579 | |
---|
| 580 | Makefile : Makefile.in config.status |
---|
| 581 | @echo "The master Makefile.in has been changed:" |
---|
| 582 | @echo "run config.status" |
---|
| 583 | @echo "Warning: This will overwrite any local Makefile modifications" |
---|
| 584 | @exit 1 |
---|
| 585 | |
---|
| 586 | #---------------------------------------------------------------------- |
---|
| 587 | # Rules for cleaning |
---|
| 588 | #---------------------------------------------------------------------- |
---|
| 589 | |
---|
| 590 | .PHONY : clean mostlyclean distclean |
---|
| 591 | |
---|
| 592 | clean mostlyclean : |
---|
| 593 | rm -rf $(objectdir)/* include checkcal.out checkcmu.out checkcu.out |
---|
| 594 | |
---|
| 595 | distclean : clean cleandependencies |
---|
| 596 | rm -f Makefile config.status config.cache config.log $(LIBRARY) \ |
---|
| 597 | $(BDD_LIBRARIES) |
---|
| 598 | |
---|
| 599 | #---------------------------------------------------------------------- |
---|
| 600 | # Rule for performing a lint-like check on the source code |
---|
| 601 | # |
---|
| 602 | # Note: This requires gcc or g++ |
---|
| 603 | #---------------------------------------------------------------------- |
---|
| 604 | |
---|
| 605 | .PHONY : check_code |
---|
| 606 | |
---|
| 607 | #: |
---|
| 608 | #: check-code -- Run a lint-like check on the source code. |
---|
| 609 | #: (useful for development) |
---|
| 610 | |
---|
| 611 | CHECK_FLAGS := -Wall -pedantic |
---|
| 612 | ifeq ($(CC),gcc) |
---|
| 613 | CHECK_FLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations |
---|
| 614 | endif |
---|
| 615 | |
---|
| 616 | check-code : $(CSRC) $(BDD_CSRC) $(MDD_CSRC) |
---|
| 617 | ifneq ($(findstring <$(CC)>,<gcc> <g++>),) |
---|
| 618 | @rm -f *.o_checkcode |
---|
| 619 | @for file in $^; do \ |
---|
| 620 | echo "------------------------ Checking $$file"; \ |
---|
| 621 | $(CC) -c $(CFLAGS) $(AC_FLAGS) $(CHECK_FLAGS) \ |
---|
| 622 | $(VERDATE) $(INCLUDEDIRS) \ |
---|
| 623 | -o $(objectdir)/checkcode_output.o $$file; \ |
---|
| 624 | rm -f $(objectdir)/checkcode_output.o; \ |
---|
| 625 | done |
---|
| 626 | @rm -f *.o_checkcode |
---|
| 627 | else |
---|
| 628 | @echo "check-code requires gcc or g++" |
---|
| 629 | @echo "Reconfigure with gcc or g++" |
---|
| 630 | endif |
---|
| 631 | |
---|
| 632 | #---------------------------------------------------------------------- |
---|
| 633 | # Revision control rules |
---|
| 634 | # |
---|
| 635 | # May be invoked with command-line overrides, e.g., |
---|
| 636 | # gmake RCSFILES=foo.c rcs_co |
---|
| 637 | # gmake PKGS=array rcs_ci |
---|
| 638 | #---------------------------------------------------------------------- |
---|
| 639 | |
---|
| 640 | .PHONY: rcs_ci rcs_co rcs_diff rcs_ident rcs_status |
---|
| 641 | |
---|
| 642 | #: |
---|
| 643 | #: You may want to invoke the RCS rules with |
---|
| 644 | #: gmake "PKGS=tst tbl" rcs_ci |
---|
| 645 | #: gmake "RCSFILES=tstMain.c" rcs_co |
---|
| 646 | #: |
---|
| 647 | #: rcs_ci -- check in user-modified files and put an updated copy |
---|
| 648 | #: in the central area |
---|
| 649 | |
---|
| 650 | rcs_ci: $(RCSFILES) |
---|
| 651 | @for file in $(patsubst $(local_srcdir)/%, %, $^); \ |
---|
| 652 | do \ |
---|
| 653 | ci -u $(RCSFLAGS) $(local_srcdir)/$$file $(rcs_rootdir)/$$file,v; \ |
---|
| 654 | co -u $(RCSFLAGS) $(master_srcdir)/$$file $(rcs_rootdir)/$$file,v; \ |
---|
| 655 | done |
---|
| 656 | |
---|
| 657 | #: rcs_co -- check out files for modification |
---|
| 658 | |
---|
| 659 | rcs_co: $(RCSFILES) |
---|
| 660 | @for file in $(patsubst $(local_srcdir)/%, %, $^); \ |
---|
| 661 | do \ |
---|
| 662 | co -l $(RCSFLAGS) $(local_srcdir)/$$file $(rcs_rootdir)/$$file,v; \ |
---|
| 663 | done |
---|
| 664 | |
---|
| 665 | #: rcs_diff -- Report differences between local files and checked-in versions |
---|
| 666 | |
---|
| 667 | rcs_diff: $(RCSFILES) |
---|
| 668 | @for file in $(patsubst $(local_srcdir)/%, %, $^); \ |
---|
| 669 | do \ |
---|
| 670 | rcsdiff $(RCSFLAGS) $(local_srcdir)/$$file $(rcs_rootdir)/$$file,v; \ |
---|
| 671 | done |
---|
| 672 | |
---|
| 673 | #: rcs_ident -- Print the RCS identifier in each file |
---|
| 674 | |
---|
| 675 | rcs_ident: $(RCSFILES) |
---|
| 676 | @for file in $(patsubst $(local_srcdir)/%, %, $^); \ |
---|
| 677 | do \ |
---|
| 678 | ident $(RCSFLAGS) $(local_srcdir)/$$file; \ |
---|
| 679 | done |
---|
| 680 | |
---|
| 681 | #: rcs_status -- Report who has checked out files |
---|
| 682 | |
---|
| 683 | rcs_status: $(RCSFILES) |
---|
| 684 | @for file in $(patsubst $(local_srcdir)/%, %, $^); \ |
---|
| 685 | do \ |
---|
| 686 | rlog -L -h $(RCSFLAGS) $(rcs_rootdir)/$$file,v; \ |
---|
| 687 | done |
---|
| 688 | |
---|
| 689 | #---------------------------------------------------------------------- |
---|
| 690 | # RCS rules for common/{Makefile.in, configure.in, localconfigure, |
---|
| 691 | # masterconfigure, mkinstalldirs, install-sh} |
---|
| 692 | #---------------------------------------------------------------------- |
---|
| 693 | |
---|
| 694 | .PHONY : rcs_ci_misc rcs_co_misc rcs_diff_misc |
---|
| 695 | |
---|
| 696 | #: rcs_ci_misc -- Check in miscellaneous files, updating central area |
---|
| 697 | |
---|
| 698 | rcs_ci_misc: $(RCSMISCFILES) |
---|
| 699 | @for file in $(patsubst $(local_srcdir)/%, %, $^); \ |
---|
| 700 | do \ |
---|
| 701 | ci -u $(RCSFLAGS) $(local_srcdir)/$$file $(rcs_rootdir)/$$file,v; \ |
---|
| 702 | co -u $(RCSFLAGS) $(master_srcdir)/$$file $(rcs_rootdir)/$$file,v; \ |
---|
| 703 | done |
---|
| 704 | |
---|
| 705 | #: rcs_co_misc -- Check out miscellaneous files |
---|
| 706 | |
---|
| 707 | rcs_co_misc: $(RCSMISCFILES) |
---|
| 708 | @for file in $(patsubst $(local_srcdir)/%, %, $^); \ |
---|
| 709 | do \ |
---|
| 710 | co -l $(RCSFLAGS) $(local_srcdir)/$$file $(rcs_rootdir)/$$file,v; \ |
---|
| 711 | done |
---|
| 712 | |
---|
| 713 | #: rcs_diff_misc -- Report differences in miscellaneous files |
---|
| 714 | |
---|
| 715 | rcs_diff_misc: $(RCSMISCFILES) |
---|
| 716 | @for file in $(patsubst $(local_srcdir)/%, %, $^); \ |
---|
| 717 | do \ |
---|
| 718 | rcsdiff $(RCSFLAGS) $(local_srcdir)/$$file $(rcs_rootdir)/$$file,v; \ |
---|
| 719 | done |
---|
| 720 | |
---|
| 721 | #: rcs_ident_misc -- Report RCS identifiers |
---|
| 722 | |
---|
| 723 | rcs_ident_misc: $(RCSMISCFILES) |
---|
| 724 | @for file in $(patsubst $(local_srcdir)/%, %, $^); \ |
---|
| 725 | do \ |
---|
| 726 | ident $(RCSFLAGS) $(local_srcdir)/$$file; \ |
---|
| 727 | done |
---|
| 728 | |
---|
| 729 | #: rcs_status_misc -- Report checked in/out status, ownership |
---|
| 730 | |
---|
| 731 | rcs_status_misc: $(RCSMISCFILES) |
---|
| 732 | @for file in $(patsubst $(local_srcdir)/%, %, $^); \ |
---|
| 733 | do \ |
---|
| 734 | rlog -L -h $(RCSFLAGS) $(rcs_rootdir)/$$file,v; \ |
---|
| 735 | done |
---|
| 736 | |
---|
| 737 | #---------------------------------------------------------------------- |
---|
| 738 | # Rules for debugging the Makefile |
---|
| 739 | #---------------------------------------------------------------------- |
---|
| 740 | |
---|
| 741 | DEBUG_VARS = PKGS \ |
---|
| 742 | BDD_PKGS \ |
---|
| 743 | ALL_BASIC_PKGS \ |
---|
| 744 | ALL_BDD_PKGS \ |
---|
| 745 | ALL_MDD_PKGS \ |
---|
| 746 | MISSING_PKGS \ |
---|
| 747 | MISSING_BDD_PKGS \ |
---|
| 748 | MISSING_MDD_PKGS \ |
---|
| 749 | FULL_PKGS \ |
---|
| 750 | FULL_MISSING_PKGS \ |
---|
| 751 | SHELL \ |
---|
| 752 | PRODUCT \ |
---|
| 753 | VERSION \ |
---|
| 754 | prefix \ |
---|
| 755 | exec_prefix \ |
---|
| 756 | master_srcdir \ |
---|
| 757 | local_srcdir \ |
---|
| 758 | libdir \ |
---|
| 759 | includedir \ |
---|
| 760 | objectdir \ |
---|
| 761 | headerdir \ |
---|
| 762 | LIBRARY \ |
---|
| 763 | BDD_LIBRARIES \ |
---|
| 764 | AC_FLAGS \ |
---|
| 765 | RANLIB \ |
---|
| 766 | CC \ |
---|
| 767 | CFLAGS \ |
---|
| 768 | INSTALL \ |
---|
| 769 | INSTALL_DATA \ |
---|
| 770 | MAKEINCLUDES \ |
---|
| 771 | OBJECTS \ |
---|
| 772 | BDD_CSRC \ |
---|
| 773 | BDD_HEADERS \ |
---|
| 774 | CAL_OBJECTS \ |
---|
| 775 | CMU_OBJECTS \ |
---|
| 776 | CU_OBJECTS \ |
---|
| 777 | MDD_CSRC \ |
---|
| 778 | MDD_HEADERS \ |
---|
| 779 | MDD_OBJECTS \ |
---|
| 780 | INCLUDEDIRS \ |
---|
| 781 | VPATH \ |
---|
| 782 | DISTRIBUTION \ |
---|
| 783 | DISTDIRS \ |
---|
| 784 | DISTFILES \ |
---|
| 785 | GLU \ |
---|
| 786 | RCSFILES \ |
---|
| 787 | rcs_rootdir \ |
---|
| 788 | RCSMISCFILES |
---|
| 789 | |
---|
| 790 | .PHONY : debug-make |
---|
| 791 | |
---|
| 792 | #: |
---|
| 793 | #: debug-make - Print a list of Makefile variables |
---|
| 794 | |
---|
| 795 | debug-make: |
---|
| 796 | @$(foreach var, $(DEBUG_VARS), echo $(var)=$($(var)) ; ) |
---|