Remove building with NOCRYPTO option
[minix.git] / sys / lib / libsa / Makefile.inc
blobc7e8584713d45d173a2ce2539a766fb1a705316d
1 #       $NetBSD: Makefile.inc,v 1.22 2015/09/06 15:34:55 uebayasi Exp $
3 #       Configuration variables (default values are below):
5 #       S       must be set to the top of the 'sys' tree.
6 #       SADST   may be set to the location of the directory where library
7 #               objects are to be built.  Defaults to ${.OBJDIR}/lib/sa.
8 #       SA_AS   may be set to 'obj' to build a object from the library's
9 #               object files.  (Otherwise, a library will be built.)
10 #               Defaults to 'library'.
11 #       SAMISCCPPFLAGS
12 #               Miscellaneous cpp flags to be passed to the library's Makefile
13 #               when building.
14 #       SAMISCMAKEFLAGS
15 #               Miscellaneous flags to be passed to the library's Makefile when
16 #               building.  See library's Makefile for more details about
17 #               supported flags and their default values.
19 # Default values:
20 SADST?=         ${.OBJDIR}/lib/sa
21 SA_AS?=         library
22 SADOTDIR?= ../../.
24 CWARNFLAGS.clang+=      -Wno-format-extra-args
26 SADIR=          ${S:S@^.@${SADOTDIR}@:Q}/lib/libsa
27 .if (${SA_AS} == "obj")
28 SALIB=          ${SADST}/libsa.o
29 SALIB_PROF=     ${SADST}/libsa.po
30 .else
31 SALIB=          ${SADST}/libsa.a
32 SALIB_PROF=     ${SADST}/libsa_p.a
33 .endif
34 ZLIBSRCDIR:=    ${.PARSEDIR}/../../../common/dist/zlib
35 SAMISCCPPFLAGS+=-I${ZLIBSRCDIR}
37 SAMAKE= \
38         cd ${SADST} && ${MAKE} -f ${SADIR:Q}/Makefile \
39             SADIR=${SADIR:Q} \
40             CC=${CC:Q} CFLAGS=${CFLAGS:Q} CPUFLAGS= \
41             AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
42             LORDER=${LORDER:Q} \
43             TSORT=${TSORT:Q} \
44             LD=${LD:Q} STRIP=${STRIP:Q} \
45             AR=${AR:Q} NM=${NM:Q} \
46             RANLIB=${RANLIB:Q} SIZE=${SIZE:Q} \
47             MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
48             SACPPFLAGS=${CPPFLAGS:S@^-I.@-I${SADOTDIR}@g:Q} \
49             SAMISCCPPFLAGS=${SAMISCCPPFLAGS:Q} \
50             ${SAMISCMAKEFLAGS}
52 ${SALIB}:               .NOTMAIN .MAKE __always_make_salib
53         @echo making sure the sa library is up to date...
54 .if (${SA_AS} == "library")
55         @${SAMAKE} libsa.a
56 .else
57         @${SAMAKE} libsa.o
58 .endif
59         @echo done
61 ${SALIB_PROF}:          .NOTMAIN .MAKE __always_make_salib
62         @echo making sure the profiled sa library is up to date...
63 .if (${SA_AS} == "library")
64         @${SAMAKE} libsa_p.a
65 .else
66         @${SAMAKE} libsa.po
67 .endif
68         @echo done
70 clean:                  .NOTMAIN cleansalib
71 cleansalib:             .NOTMAIN
72         @echo cleaning the sa library objects
73         @if [ -d "${SADST}" ]; then ${SAMAKE} clean; fi
74         @echo done
76 cleandir distclean:     .NOTMAIN cleandirsalib
77 cleandirsalib:          .NOTMAIN
78         @echo cleandiring the sa library objects
79         @if [ -d "${SADST}" ]; then ${SAMAKE} cleandir; fi
80         @echo done
82 dependall depend:       .NOTMAIN dependsalib
83 dependsalib:            .NOTMAIN .MAKE __always_make_salib
84         @echo depending the sa library objects
85         @${SAMAKE} depend
86         @echo done
88 __always_make_salib:    .NOTMAIN
89         @mkdir -p ${SADST}
91 .PHONY: __always_make_salib
92 .PHONY: cleansalib cleandirsalib dependsalib