]> git.sur5r.net Git - openldap/blob - build/platforms/Make-setup
Check LOCK_ID() return
[openldap] / build / platforms / Make-setup
1 #
2 # You should NOT need to edit this file at all:  if you just type make
3 # in this directory, LDAP will be built for this platform using this
4 # compiler.  If you type   make links  a build area will be created for
5 # you under ./obj.  You should # cd in there and edit the Make-common file
6 # before building.  See the LDAP INSTALL file for more information.
7 #
8 #-----------------------------------------------------------------------------
9 # Copyright (c) 1994 Regents of the University of Michigan.
10 # All rights reserved.
11 #
12 # Redistribution and use in source and binary forms are permitted
13 # provided that this notice is preserved and that due credit is given
14 # to the University of Michigan at Ann Arbor. The name of the University
15 # may not be used to endorse or promote products derived from this
16 # software without specific prior written permission. This software
17 # is provided ``as is'' without express or implied warranty.
18 #
19 #       LDAP lightweight X.500 Directory access platform setup makefile
20 #
21 #-----------------------------------------------------------------------------
22 #
23 ############################################################################
24 #                                                                          #
25 # You should not have to edit anything in this file                        #
26 #                                                                          #
27 ############################################################################
28 LN=ln -s
29 RM=rm -f
30 SED=sed
31 PWD=pwd
32
33 LDAPSRC= ../../..
34
35 all:    platform
36         ( cd $(LDAPSRC); $(MAKE) $(MFLAGS) )
37
38 install: platform
39         ( cd $(LDAPSRC); $(MAKE) $(MFLAGS) install )
40
41 platform:       FORCE
42         @PWD=`$(PWD)`; \
43         PLATFORMCC=`basename $$PWD`; \
44         PLATFORM=`echo $$PLATFORMCC | $(SED) 's/-.*$$//'`; \
45         CC=`echo $$PLATFORMCC | $(SED) 's/^.*-//'`; \
46         echo "** Setting platform to $$PLATFORM and compiler $$CC"; \
47         ( cd $(LDAPSRC); \
48           $(RM) .make-platform; \
49           $(LN) build/platforms/$$PLATFORMCC/Make-platform .make-platform )
50
51 links:  FORCE
52         @PWD=`$(PWD)`; \
53         PLATFORMCC=`basename $$PWD`; \
54         DEST=./obj-$$PLATFORMCC; \
55         PLATFORM=`echo $$PLATFORMCC | $(SED) 's/-.*$$//'`; \
56         CC=`echo $$PLATFORMCC | $(SED) 's/^.*-//'`; \
57         echo "** Setting platform to $$PLATFORM and compiler $$CC"; \
58         ( cd $(LDAPSRC); $(MAKE) $(MFLAGS) DEST=$$DEST links; \
59           cd $$DEST; \
60           $(LN) .src/build/platforms/$$PLATFORMCC/Make-platform .make-platform ); \
61         $(LN) $(LDAPSRC)/$$DEST .
62
63 clean:  FORCE
64
65 veryclean:
66         -$(RM) -r ./obj-*
67
68 FORCE: