2 ## Makefile for OpenSSL
4 ## {- join("\n## ", @autowarntext) -}
6 our $objext = $target{obj_extension} || ".o";
7 our $depext = $target{dep_extension} || ".d";
8 our $exeext = $target{exe_extension} || "";
9 our $libext = $target{lib_extension} || ".a";
10 our $shlibext = $target{shared_extension} || ".so";
11 our $shlibextsimple = $target{shared_extension_simple} || ".so";
12 our $shlibextimport = $target{shared_import_extension} || "";
13 our $dsoext = $target{dso_extension} || ".so";
15 sub windowsdll { $config{target} =~ /^(?:Cygwin|mingw)/ }
17 # shlib and shlib_simple both take a static library name and figure
18 # out what the shlib name should be.
20 # When OpenSSL is configured "no-shared", these functions will just
21 # return empty lists, making them suitable to join().
23 # With Windows DLL producers, shlib($libname) will return the shared
24 # library name (which usually is different from the static library
25 # name) with the default shared extension appended to it, while
26 # shlib_simple($libname) will return the static library name with
27 # the shared extension followed by ".a" appended to it. The former
28 # result is used as the runtime shared library while the latter is
29 # used as the DLL import library.
31 # On all Unix systems, shlib($libname) will return the library name
32 # with the default shared extension, while shlib_simple($libname)
33 # will return the name from shlib($libname) with any SO version number
34 # removed. On some systems, they may therefore return the exact same
37 return () if $disabled{shared};
39 return $unified_info{sharednames}->{$lib} . $shlibext;
42 return () if $disabled{shared};
46 return $lib . $shlibextimport;
48 return $lib . $shlibextsimple;
51 # dso is a complement to shlib / shlib_simple that returns the
52 # given libname with the simple shared extension (possible SO version
53 # removed). This differs from shlib_simple() by being unconditional.
57 return $engine . $dsoext;
61 PLATFORM={- $config{target} -}
62 OPTIONS={- $config{options} -}
63 CONFIGURE_ARGS=({- join(", ",quotify_l(@{$config{perlargv}})) -})
64 SRCDIR={- $config{sourcedir} -}
65 BLDDIR={- $config{builddir} -}
67 VERSION={- $config{version} -}
68 MAJOR={- $config{major} -}
69 MINOR={- $config{minor} -}
70 SHLIB_VERSION_NUMBER={- $config{shlib_version_number} -}
71 SHLIB_VERSION_HISTORY={- $config{shlib_version_history} -}
72 SHLIB_MAJOR={- $config{shlib_major} -}
73 SHLIB_MINOR={- $config{shlib_minor} -}
74 SHLIB_TARGET={- $target{shared_target} -}
76 LIBS={- join(" ", map { $_.$libext } @{$unified_info{libraries}}) -}
77 SHLIBS={- join(" ", map { shlib($_) } @{$unified_info{libraries}}) -}
78 ENGINES={- join(" ", map { dso($_) } @{$unified_info{engines}}) -}
79 PROGRAMS={- join(" ", map { $_.$exeext } grep { !m|^test/| } @{$unified_info{programs}}) -}
80 TESTPROGS={- join(" ", map { $_.$exeext } grep { m|^test/| } @{$unified_info{programs}}) -}
81 SCRIPTS={- join(" ", @{$unified_info{scripts}}) -}
82 {- output_off() if $disabled{makedepend}; "" -}
83 DEPS={- join(" ", map { (my $x = $_) =~ s|\.o$|$depext|; $x; }
84 grep { $unified_info{sources}->{$_}->[0] =~ /\.c$/ }
85 keys %{$unified_info{sources}}); -}
86 {- output_on() if $disabled{makedepend}; "" -}
87 GENERATED={- join(" ", map { (my $x = $_) =~ s|\.S$|\.s|; $x } keys %{$unified_info{generate}}) -}
89 {- output_off() if $disabled{apps}; "" -}
90 BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash
91 MISC_SCRIPTS=$(SRCDIR)/tools/c_hash $(SRCDIR)/tools/c_info \
92 $(SRCDIR)/tools/c_issuer $(SRCDIR)/tools/c_name \
93 $(BLDDIR)/apps/CA.pl $(BLDDIR)/apps/tsget
94 {- output_on() if $disabled{apps}; "" -}
96 SHLIB_INFO={- join(" ", map { "\"".shlib($_).";".shlib_simple($_)."\"" } @{$unified_info{libraries}}) -}
98 # DESTDIR is for package builders so that they can configure for, say,
99 # /usr/ and yet have everything installed to /tmp/somedir/usr/.
100 # Normally it is left empty.
103 # Do not edit these manually. Use Configure with --prefix or --openssldir
104 # to change this! Short explanation in the top comment in Configure
105 INSTALLTOP={- # $prefix is used in the OPENSSLDIR perl snippet
107 our $prefix = $config{prefix} || "/usr/local";
110 # The logic here is that if no --openssldir was given,
111 # OPENSSLDIR will get the value from $prefix plus "/ssl".
112 # If --openssldir was given and the value is an absolute
113 # path, OPENSSLDIR will get its value without change.
114 # If the value from --openssldir is a relative path,
115 # OPENSSLDIR will get $prefix with the --openssldir
116 # value appended as a subdirectory.
118 use File::Spec::Functions;
120 $config{openssldir} ?
121 (file_name_is_absolute($config{openssldir}) ?
123 : catdir($prefix, $config{openssldir}))
124 : catdir($prefix, "ssl");
127 # if $prefix/lib$target{multilib} is not an existing
128 # directory, then assume that it's not searched by linker
129 # automatically, in which case adding $target{multilib} suffix
130 # causes more grief than we're ready to tolerate, so don't...
132 -d "$prefix/lib$target{multilib}" ? $target{multilib} : "";
133 our $libdir = $config{libdir} || "lib$multilib";
135 ENGINESDIR={- use File::Spec::Functions;
136 catdir($prefix,$libdir,"engines") -}
138 MANDIR=$(INSTALLTOP)/share/man
139 DOCDIR=$(INSTALLTOP)/share/doc/$(BASENAME)
140 HTMLDIR=$(DOCDIR)/html
142 # MANSUFFIX is for the benefit of anyone who may want to have a suffix
143 # appended after the manpage file section number. "ssl" is popular,
144 # resulting in files such as config.5ssl rather than config.5.
150 CROSS_COMPILE= {- $config{cross_compile_prefix} -}
151 CC= $(CROSS_COMPILE){- $target{cc} -}
152 CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -}
153 CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
154 LDFLAGS= {- $target{lflags} -}
155 PLIB_LDFLAGS= {- $target{plib_lflags} -}
156 EX_LIBS= {- $target{ex_libs} -} {- $config{ex_libs} -}
157 LIB_CFLAGS={- $target{shared_cflag} || "" -}
158 LIB_LDFLAGS={- $target{shared_ldflag}." ".$config{shared_ldflag}
159 # Unlike other OSes (like Solaris, Linux, Tru64,
160 # IRIX) BSD run-time linkers (tested OpenBSD, NetBSD
161 # and FreeBSD) "demand" RPATH set on .so objects.
162 # Apparently application RPATH is not global and
163 # does not apply to .so linked with other .so.
164 # Problem manifests itself when libssl.so fails to
165 # load libcrypto.so. One can argue that we should
166 # engrave this into Makefile.shared rules or into
167 # BSD-* config lines above. Meanwhile let's try to
168 # be cautious and pass -rpath to linker only when
169 # $prefix is not /usr.
170 . ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
171 ? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
172 RCFLAGS={- $target{shared_rcflag} -}
173 DSO_CFLAGS={- $target{shared_cflag} || "" -}
174 DSO_LDFLAGS=$(LIB_LDFLAGS)
177 PERL={- $config{perl} -}
179 ARFLAGS= {- $target{arflags} -}
180 AR=$(CROSS_COMPILE){- $target{ar} || "ar" -} $(ARFLAGS) r
181 RANLIB= {- $target{ranlib} -}
182 NM= $(CROSS_COMPILE){- $target{nm} || "nm" -}
185 TAR= {- $target{tar} || "tar" -}
186 TARFLAGS= {- $target{tarflags} -}
187 MAKEDEPEND={- $config{makedepprog} -}
190 NAME= $(BASENAME)-$(VERSION)
191 TARFILE= ../$(NAME).tar
193 # We let the C compiler driver to take care of .s files. This is done in
194 # order to be excused from maintaining a separate set of architecture
195 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
196 # gcc, then the driver will automatically translate it to -xarch=v8plus
197 # and pass it down to assembler.
200 PERLASM_SCHEME= {- $target{perlasm_scheme} -}
202 # For x86 assembler: Set PROCESSOR to 386 if you want to support
204 PROCESSOR= {- $config{processor} -}
206 # The main targets ###################################################
208 all: configdata.pm build_libs_nodep build_engines_nodep build_apps_nodep \
211 build_libs: configdata.pm build_libs_nodep depend
212 build_libs_nodep: libcrypto.pc libssl.pc openssl.pc
213 build_engines: configdata.pm build_engines_nodep depend
214 build_engines_nodep: $(ENGINES)
215 build_apps: configdata.pm build_apps_nodep depend
216 build_apps_nodep: $(PROGRAMS) $(SCRIPTS)
217 build_tests: configdata.pm build_tests_nodep depend
218 build_tests_nodep: $(TESTPROGS)
220 test tests: build_tests_nodep build_apps_nodep build_engines_nodep \
222 @ : {- output_off() if $disabled{tests}; "" -}
224 SRCTOP=../$(SRCDIR) \
225 BLDTOP=../$(BLDDIR) \
226 EXE_EXT={- $exeext -} \
227 OPENSSL_ENGINES=../$(BLDDIR)/engines \
228 $(PERL) ../$(SRCDIR)/test/run_tests.pl $(TESTS) )
229 @ : {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
230 @echo "Tests are not supported with your chosen Configure options"
231 @ : {- output_on() if !$disabled{tests}; "" -}
234 @TOP=$(SRCDIR) PERL=$(PERL) $(PERL) $(SRCDIR)/test/run_tests.pl list
237 @set -e; for s in $(SHLIB_INFO); do \
238 s1=`echo "$$s" | cut -f1 -d";"`; \
239 s2=`echo "$$s" | cut -f2 -d";"`; \
242 if [ "$$s1" != "$$s2" ]; then \
249 install: install_sw install_ssldirs install_docs
251 uninstall: uninstall_docs uninstall_sw
254 rm -f $(PROGRAMS) $(TESTPROGS) $(ENGINES) $(SCRIPTS)
256 -rm -f `find . -name '*{- $depext -}'`
257 -rm -f `find . -name '*{- $objext -}'`
260 rm -f openssl.pc libcrypto.pc libssl.pc
261 -rm -f `find . -type l`
264 # This exists solely for those who still type 'make depend'
266 # We check if any depfile is newer than Makefile and decide to
267 # concatenate only if that is true.
269 @: {- output_off() if $disabled{makedepend}; "" -}
270 @if [ -n "`find $(DEPS) -newer Makefile 2>/dev/null; exit 0`" ]; then \
271 ( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
272 echo '# DO NOT DELETE THIS LINE -- make depend depends on it.'; \
274 for f in $(DEPS); do \
275 if [ -f $$f ]; then cat $$f; fi; \
276 done ) > Makefile.new; \
277 if cmp Makefile.new Makefile >/dev/null 2>&1; then \
278 rm -f Makefile.new; \
280 mv -f Makefile.new Makefile; \
283 @: {- output_on() if $disabled{makedepend}; "" -}
285 # Install helper targets #############################################
287 install_sw: all install_dev install_engines install_runtime
289 uninstall_sw: uninstall_runtime uninstall_engines uninstall_dev
291 install_docs: install_man_docs install_html_docs
293 uninstall_docs: uninstall_man_docs uninstall_html_docs
294 $(RM) -r -v $(DESTDIR)$(DOCDIR)
297 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/certs
298 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/private
301 @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
302 @echo "*** Installing development files"
303 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/include/openssl
304 @set -e; for i in $(SRCDIR)/include/openssl/*.h \
305 $(BLDDIR)/include/openssl/*.h; do \
307 echo "install $$i -> $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn"; \
308 cp $$i $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn; \
309 chmod 644 $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn; \
311 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)
312 @set -e; for l in $(LIBS); do \
314 echo "install $$l -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
315 cp $$l $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
316 $(RANLIB) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
317 chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
318 mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new \
319 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
321 @ : {- output_off() if $disabled{shared}; "" -}
322 @set -e; for s in $(SHLIB_INFO); do \
323 s1=`echo "$$s" | cut -f1 -d";"`; \
324 s2=`echo "$$s" | cut -f2 -d";"`; \
325 fn1=`basename $$s1`; \
326 fn2=`basename $$s2`; \
327 : {- output_off() if windowsdll(); "" -}; \
328 echo "install $$s1 -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1"; \
329 cp $$s1 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1.new; \
330 chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1.new; \
331 mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1.new \
332 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1; \
333 if [ "$$fn1" != "$$fn2" ]; then \
334 echo "link $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2 -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1"; \
335 ln -sf $$fn1 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
337 : {- output_on() if windowsdll(); "" -}{- output_off() unless windowsdll(); "" -}; \
338 echo "install $$s2 -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2"; \
339 cp $$s2 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2.new; \
340 chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2.new; \
341 mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2.new \
342 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
343 : {- output_on() unless windowsdll(); "" -}; \
345 @ : {- output_on() if $disabled{shared}; "" -}
346 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
347 @echo "install libcrypto.pc -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc"
348 @cp libcrypto.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
349 @chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
350 @echo "install libssl.pc -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc"
351 @cp libssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
352 @chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
353 @echo "install openssl.pc -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc"
354 @cp openssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
355 @chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
358 @echo "*** Uninstalling development files"
359 @set -e; for i in $(SRCDIR)/include/openssl/*.h \
360 $(BLDDIR)/include/openssl/*.h; do \
362 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn"; \
363 $(RM) $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn; \
365 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/include/openssl
366 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/include
367 @set -e; for l in $(LIBS); do \
369 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
370 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
372 @ : {- output_off() if $disabled{shared}; "" -}
373 @set -e; for s in $(SHLIB_INFO); do \
374 s1=`echo "$$s" | cut -f1 -d";"`; \
375 s2=`echo "$$s" | cut -f2 -d";"`; \
376 fn1=`basename $$s1`; \
377 fn2=`basename $$s2`; \
378 : {- output_off() if windowsdll(); "" -}; \
379 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1"; \
380 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1; \
381 if [ "$$fn1" != "$$fn2" ]; then \
382 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2"; \
383 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
385 : {- output_on() if windowsdll(); "" -}{- output_off() unless windowsdll(); "" -}; \
386 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2"; \
387 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
388 : {- output_on() unless windowsdll(); "" -}; \
390 @ : {- output_on() if $disabled{shared}; "" -}
391 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
392 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
393 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
394 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
395 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)
398 @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
399 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/
400 @echo "*** Installing engines"
401 @set -e; for e in dummy $(ENGINES); do \
402 if [ "$$e" = "dummy" ]; then continue; fi; \
404 if [ "$$fn" = '{- dso("ossltest") -}' ]; then \
407 echo "install $$e -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn"; \
408 cp $$e $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new; \
409 chmod 755 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new; \
410 mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new \
411 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn; \
415 @echo "*** Uninstalling engines"
416 @set -e; for e in dummy $(ENGINES); do \
417 if [ "$$e" = "dummy" ]; then continue; fi; \
419 if [ "$$fn" = '{- dso("ossltest") -}' ]; then \
422 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn"; \
423 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn; \
425 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines
428 @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
429 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/bin
430 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/misc
431 @echo "*** Installing runtime files"
432 : {- output_off() unless windowsdll(); "" -};
433 @set -e; for s in dummy $(SHLIBS); do \
434 if [ "$$s" = "dummy" ]; then continue; fi; \
436 echo "install $$s -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
437 cp $$s $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
438 chmod 644 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
439 mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \
440 $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
442 : {- output_on() unless windowsdll(); "" -};
443 @set -e; for x in dummy $(PROGRAMS); do \
444 if [ "$$x" = "dummy" ]; then continue; fi; \
446 echo "install $$x -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
447 cp $$x $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
448 chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
449 mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \
450 $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
452 @set -e; for x in dummy $(BIN_SCRIPTS); do \
453 if [ "$$x" = "dummy" ]; then continue; fi; \
455 echo "install $$x -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
456 cp $$x $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
457 chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
458 mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \
459 $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
461 @set -e; for x in dummy $(MISC_SCRIPTS); do \
462 if [ "$$x" = "dummy" ]; then continue; fi; \
464 echo "install $$x -> $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \
465 cp $$x $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \
466 chmod 755 $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \
467 mv -f $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new \
468 $(DESTDIR)$(OPENSSLDIR)/misc/$$fn; \
470 @echo "install $(SRCDIR)/apps/openssl.cnf -> $(DESTDIR)$(OPENSSLDIR)/openssl.cnf"
471 @cp $(SRCDIR)/apps/openssl.cnf $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new
472 @chmod 644 $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new
473 @mv -f $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
476 @echo "*** Uninstalling runtime files"
477 @set -e; for x in dummy $(PROGRAMS); \
479 if [ "$$x" = "dummy" ]; then continue; fi; \
481 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
482 $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
484 @set -e; for x in dummy $(BIN_SCRIPTS); \
486 if [ "$$x" = "dummy" ]; then continue; fi; \
488 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
489 $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
491 @set -e; for x in dummy $(MISC_SCRIPTS); \
493 if [ "$$x" = "dummy" ]; then continue; fi; \
495 echo "$(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \
496 $(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$fn; \
498 : {- output_off() unless windowsdll(); "" -};
499 @set -e; for s in dummy $(SHLIBS); do \
500 if [ "$$s" = "dummy" ]; then continue; fi; \
502 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
503 $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
505 : {- output_on() unless windowsdll(); "" -};
506 $(RM) $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
507 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/bin
508 -$(RMDIR) $(DESTDIR)$(OPENSSLDIR)/misc
510 # A method to extract all names from a .pod file
511 # The first sed extracts everything between "=head1 NAME" and the next =head1
512 # The perl command joins all the lines into one
513 # The second sed removes the description and turns all commas into spaces
514 # Voilà , you have a space separated list of names!
515 EXTRACT_NAMES=sed -e '1,/^=head1 *NAME *$$/d;/^=head1/,$$d' | \
516 $(PERL) -p -0 -e 's/\n/ /g; END {print "\n"}' | \
517 sed -e 's/ - .*$$//;s/,/ /g'
520 here=`cd $(SRCDIR); pwd`; \
521 point=$$here/util/point.sh; \
522 for ds in apps:1 crypto:3 ssl:3; do \
523 defdir=`echo $$ds | cut -f1 -d:`; \
524 defsec=`echo $$ds | cut -f2 -d:`; \
525 for p in $(SRCDIR)/doc/$$defdir/*.pod; do \
526 SEC=`sed -ne 's/^=for *comment *openssl_manual_section: *\([0-9]\) *$$/\1/p' $$p`; \
527 [ -z "$$SEC" ] && SEC=$$defsec; \
528 fn=`basename $$p .pod`; \
529 NAME=`echo $$fn | tr [a-z] [A-Z]`; \
530 suf=`eval "echo $$OUTSUFFIX"`; \
531 top=`eval "echo $$OUTTOP"`; \
532 $(PERL) $(SRCDIR)/util/mkdir-p.pl $$top/man$$SEC; \
533 echo "install $$p -> $$top/man$$SEC/$$fn$$suf"; \
534 cat $$p | eval "$$GENERATE" \
535 > $$top/man$$SEC/$$fn$$suf; \
536 names=`cat $$p | $(EXTRACT_NAMES)`; \
537 ( cd $$top/man$$SEC; \
538 for n in $$names; do \
541 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
542 comp_n=`echo "$$n" | tr [A-Z] [a-z]`; \
543 comp_fn=`echo "$$fn" | tr [A-Z] [a-z]`; \
546 if [ "$$comp_n" != "$$comp_fn" ]; then \
547 echo "link $$top/man$$SEC/$$n$$suf -> $$top/man$$SEC/$$fn$$suf"; \
548 PLATFORM=$(PLATFORM) $$point $$fn$$suf $$n$$suf; \
555 here=`cd $(SRCDIR); pwd`; \
556 for ds in apps:1 crypto:3 ssl:3; do \
557 defdir=`echo $$ds | cut -f1 -d:`; \
558 defsec=`echo $$ds | cut -f2 -d:`; \
559 for p in $(SRCDIR)/doc/$$defdir/*.pod; do \
560 SEC=`sed -ne 's/^=for *comment *openssl_manual_section: *\([0-9]\) *$$/\1/p' $$p`; \
561 [ -z "$$SEC" ] && SEC=$$defsec; \
562 fn=`basename $$p .pod`; \
563 suf=`eval "echo $$OUTSUFFIX"`; \
564 top=`eval "echo $$OUTTOP"`; \
565 echo "$(RM) $$top/man$$SEC/$$fn$$suf"; \
566 $(RM) $$top/man$$SEC/$$fn$$suf; \
567 names=`cat $$p | $(EXTRACT_NAMES)`; \
568 for n in $$names; do \
571 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
572 comp_n=`echo "$$n" | tr [A-Z] [a-z]`; \
573 comp_fn=`echo "$$fn" | tr [A-Z] [a-z]`; \
576 if [ "$$comp_n" != "$$comp_fn" ]; then \
577 echo "$(RM) $$top/man$$SEC/$$n$$suf"; \
578 $(RM) $$top/man$$SEC/$$n$$suf; \
581 ( $(RMDIR) $$top/man$$SEC 2>/dev/null || exit 0 ); \
586 @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
587 @echo "*** Installing manpages"
589 OUTSUFFIX='.$${SEC}$(MANSUFFIX)'; \
590 OUTTOP="$(DESTDIR)$(MANDIR)"; \
591 GENERATE='pod2man --name=$$NAME --section=$$SEC --center=OpenSSL --release=$(VERSION)'; \
595 @echo "*** Uninstalling manpages"
597 OUTSUFFIX='.$${SEC}$(MANSUFFIX)'; \
598 OUTTOP="$(DESTDIR)$(MANDIR)"; \
602 @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
603 @echo "*** Installing HTML manpages"
605 OUTSUFFIX='.$(HTMLSUFFIX)'; \
606 OUTTOP="$(DESTDIR)$(HTMLDIR)"; \
607 GENERATE="pod2html --podroot=$(SRCDIR)/doc --htmldir=.. \
608 --podpath=apps:crypto:ssl \
609 | sed -e 's|href=\"http://man.he.net/man|href=\"../man|g'"; \
613 @echo "*** Uninstalling manpages"
615 OUTSUFFIX='.$(HTMLSUFFIX)'; \
616 OUTTOP="$(DESTDIR)$(HTMLDIR)"; \
620 # Developer targets (note: these are only available on Unix) #########
622 update: generate errors ordinals
624 generate: generate_apps generate_crypto_bn generate_crypto_objects
626 # Test coverage is a good idea for the future
627 #coverage: $(PROGRAMS) $(TESTPROGRAMS)
630 # Currently disabled, util/selftest.pl needs a rewrite
632 # SRCDIR=$(SRCDIR) @$(PERL) util/selftest.pl
635 lint -DLINT $(INCLUDES) $(SRCS)
637 {- # because the program apps/openssl has object files as sources, and
638 # they then have the corresponding C files as source, we need to chain
639 # the lookups in %unified_info
640 my $apps_openssl = catfile("apps","openssl");
641 our @openssl_source = map { @{$unified_info{sources}->{$_}} }
642 @{$unified_info{sources}->{$apps_openssl}};
645 ( cd $(SRCDIR); $(PERL) VMS/VMSify-conf.pl \
646 < apps/openssl.cnf > apps/openssl-vms.cnf )
647 ( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b apps/progs.pl \
648 {- join(" ", @openssl_source) -} \
652 ( cd $(SRCDIR); $(PERL) crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
654 generate_crypto_objects:
655 ( cd $(SRCDIR); $(PERL) crypto/objects/obj_dat.pl \
656 include/openssl/obj_mac.h \
657 crypto/objects/obj_dat.h )
658 ( cd $(SRCDIR); $(PERL) crypto/objects/objects.pl \
659 crypto/objects/objects.txt \
660 crypto/objects/obj_mac.num \
661 include/openssl/obj_mac.h )
662 ( cd $(SRCDIR); $(PERL) crypto/objects/objxref.pl \
663 crypto/objects/obj_mac.num \
664 crypto/objects/obj_xref.txt \
665 > crypto/objects/obj_xref.h )
668 ( cd $(SRCDIR); $(PERL) util/ck_errf.pl -strict */*.c */*/*.c )
669 ( cd $(SRCDIR); $(PERL) util/mkerr.pl -recurse -write )
670 ( cd $(SRCDIR)/engines; \
672 $(PERL) ../util/mkerr.pl -conf $$e \
673 -nostatic -staticloader -write *.c; \
677 ( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mkdef.pl crypto update )
678 ( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mkdef.pl ssl update )
682 SRCTOP=../$(SRCDIR) \
683 BLDTOP=../$(BLDDIR) \
684 $(PERL) ../$(SRCDIR)/test/run_tests.pl test_ordinals )
689 -etags `find . -name '*.[ch]' -o -name '*.pm'`
691 # Release targets (note: only available on Unix) #####################
693 TAR_COMMAND=$(TAR) $(TARFLAGS) --owner 0 --group 0 -cvf -
696 TMPDIR=/var/tmp/openssl-copy.$$$$; \
698 mkdir -p $$TMPDIR/$$DISTDIR; \
700 git ls-tree -r --name-only --full-tree HEAD \
702 mkdir -p $$TMPDIR/$$DISTDIR/`dirname $$F`; \
703 cp $$F $$TMPDIR/$$DISTDIR/$$F; \
707 find $$TMPDIR/$$DISTDIR -type d -print | xargs chmod 755; \
708 find $$TMPDIR/$$DISTDIR -type f -print | xargs chmod a+r; \
709 find $$TMPDIR/$$DISTDIR -type f -perm -0100 -print | xargs chmod a+x; \
710 $(TAR_COMMAND) $$DISTDIR) \
711 | (cd $(SRCDIR); gzip --best > $(TARFILE).gz); \
713 cd $(SRCDIR); ls -l $(TARFILE).gz
716 @$(MAKE) PREPARE_CMD='./Configure dist' tar
718 # Helper targets #####################################################
720 link-utils: $(BLDDIR)/util/opensslwrap.sh $(BLDDIR)/util/shlib_wrap.sh
722 $(BLDDIR)/util/opensslwrap.sh: configdata.pm
723 @if [ "$(SRCDIR)" != "$(BLDDIR)" ]; then \
724 mkdir -p "$(BLDDIR)/util"; \
725 ln -sf "../$(SRCDIR)/util/opensslwrap.sh" "$(BLDDIR)/util"; \
727 $(BLDDIR)/util/shlib_wrap.sh: configdata.pm
728 @if [ "$(SRCDIR)" != "$(BLDDIR)" ]; then \
729 mkdir -p "$(BLDDIR)/util"; \
730 ln -sf "../$(SRCDIR)/util/shlib_wrap.sh" "$(BLDDIR)/util"; \
734 # Building targets ###################################################
736 libcrypto.pc libssl.pc openssl.pc: configdata.pm $(LIBS)
738 @ ( echo 'prefix=$(INSTALLTOP)'; \
739 echo 'exec_prefix=$${prefix}'; \
740 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
741 echo 'includedir=$${prefix}/include'; \
743 echo 'Name: OpenSSL-libcrypto'; \
744 echo 'Description: OpenSSL cryptography library'; \
745 echo 'Version: '$(VERSION); \
746 echo 'Libs: -L$${libdir} -lcrypto'; \
747 echo 'Libs.private: $(EX_LIBS)'; \
748 echo 'Cflags: -I$${includedir}' ) > libcrypto.pc
751 @ ( echo 'prefix=$(INSTALLTOP)'; \
752 echo 'exec_prefix=$${prefix}'; \
753 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
754 echo 'includedir=$${prefix}/include'; \
756 echo 'Name: OpenSSL-libssl'; \
757 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
758 echo 'Version: '$(VERSION); \
759 echo 'Requires.private: libcrypto'; \
760 echo 'Libs: -L$${libdir} -lssl'; \
761 echo 'Libs.private: $(EX_LIBS)'; \
762 echo 'Cflags: -I$${includedir}' ) > libssl.pc
765 @ ( echo 'prefix=$(INSTALLTOP)'; \
766 echo 'exec_prefix=$${prefix}'; \
767 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
768 echo 'includedir=$${prefix}/include'; \
770 echo 'Name: OpenSSL'; \
771 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
772 echo 'Version: '$(VERSION); \
773 echo 'Requires: libssl libcrypto' ) > openssl.pc
775 # Note on the use of $(MFLAGS): this was an older variant of MAKEFLAGS which
776 # wasn't passed down automatically. It's quite safe to use it like we do
777 # below; if it doesn't exist, the result will be empty and 'make' will pick
778 # up $(MAKEFLAGS) which is passed down as an environment variable.
779 configdata.pm: $(SRCDIR)/Configurations/unix-Makefile.tmpl $(SRCDIR)/Configurations/common.tmpl $(SRCDIR)/Configure $(SRCDIR)/config {- join(" ", @{$config{build_infos}}) -}
780 @echo "Detected changed: $?"
781 @echo "Reconfiguring..."
782 $(SRCDIR)/Configure reconf
783 @echo "**************************************************"
785 @echo "*** Please run the same make command again ***"
787 @echo "**************************************************"
792 use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs/;
794 # Helper function to figure out dependencies on libraries
795 # It takes a list of library names and outputs a list of dependencies
796 sub compute_lib_depends {
797 if ($disabled{shared}) {
798 return map { $_.$libext } @_;
801 # Depending on shared libraries:
802 # On Windows POSIX layers, we depend on {libname}.dll.a
803 # On Unix platforms, we depend on {shlibname}.so
804 return map { shlib_simple($_) } @_;
809 my $generator = join(" ", @{$args{generator}});
810 my $incs = join("", map { " -I".$_ } @{$args{incs}});
811 my $deps = join(" ", @{$args{deps}});
813 if ($args{src} !~ /\.[sS]$/) {
815 $args{src}: $args{generator}->[0] $deps
816 \$(PERL) $generator > \$@
819 if ($args{generator}->[0] =~ /\.pl$/) {
820 $generator = 'CC="$(CC)" $(PERL) '.$generator;
821 } elsif ($args{generator}->[0] =~ /\.m4$/) {
822 $generator = 'm4 -B 8192 '.$generator.' >'
823 } elsif ($args{generator}->[0] =~ /\.S$/) {
826 die "Generator type for $args{src} unknown: $generator\n";
829 if (defined($generator)) {
830 # If the target is named foo.S in build.info, we want to
831 # end up generating foo.s in two steps.
832 if ($args{src} =~ /\.S$/) {
833 (my $target = $args{src}) =~ s|\.S$|.s|;
835 $target: $args{generator}->[0] $deps
836 ( trap "rm -f \$@.*" INT 0; \\
838 \$(CC) \$(CFLAGS) $incs -E -P \$@.S > \$@.i && mv -f \$@.i \$@ )
843 $args{src}: $args{generator}->[0] $deps
848 $args{src}: $args{generator}->[0] $deps
849 \$(CC) \$(CFLAGS) $incs -E -P \$< > \$@
854 # Should one wonder about the end of the Perl snippet, it's because this
855 # second regexp eats up line endings as well, if the removed path is the
856 # last in the line. We may therefore need to put back a line ending.
859 my $obj = $args{obj};
860 my @srcs = map { if ($unified_info{generate}->{$_}) {
861 (my $x = $_) =~ s/\.S$/.s/; $x
865 } ( @{$args{srcs}} );
866 my $srcs = join(" ", @srcs);
867 my $deps = join(" ", @srcs, @{$args{deps}});
868 my $incs = join("", map { " -I".$_ } @{$args{incs}});
869 unless ($disabled{zlib}) {
870 if ($withargs{zlib_include}) {
871 $incs .= " -I".$withargs{zlib_include};
874 my $ecflags = { lib => '$(LIB_CFLAGS)',
875 dso => '$(DSO_CFLAGS)',
876 bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
877 my $makedepprog = $config{makedepprog};
879 if (!$disabled{makedepend} && $makedepprog =~ /\/makedepend/) {
882 -\$(MAKEDEPEND) -f- -o"|$obj$objext" -- \$(CFLAGS) $ecflags$incs -- $srcs \\
883 >\$\@.tmp 2>/dev/null
884 -\$(PERL) -i -pe 's/^.*\\|//; s/ \\/(\\\\.|[^ ])*//; \$\$_ = undef if (/: *\$\$/ || /^(#.*| *)\$\$/); \$\$_.="\\n" unless !defined(\$\$_) or /\\R\$\$/g;' \$\@.tmp
885 \@if cmp \$\@.tmp \$\@ > /dev/null 2> /dev/null; then \\
891 $deps = $obj.$depext;
893 if ($disabled{makedepend} || $makedepprog =~ /\/makedepend/) {
896 \$(CC) \$(CFLAGS) $ecflags$incs -c -o \$\@ $srcs
899 if (!$disabled{makedepend} && $makedepprog !~ /\/makedepend/) {
902 \$(CC) \$(CFLAGS) $ecflags$incs -MMD -MF $obj$depext.tmp -MT \$\@ -c -o \$\@ $srcs
903 \@touch $obj$depext.tmp
904 \@if cmp $obj$depext.tmp $obj$depext > /dev/null 2> /dev/null; then \\
905 rm -f $obj$depext.tmp; \\
907 mv $obj$depext.tmp $obj$depext; \\
913 # On Unix, we build shlibs from static libs, so we're ignoring the
914 # object file array. We *know* this routine is only called when we've
915 # configure 'shared'.
918 my $lib = $args{lib};
919 my $shlib = $args{shlib};
920 my $libd = dirname($lib);
921 my $libn = basename($lib);
922 (my $libname = $libn) =~ s/^lib//;
923 my $linklibs = join("", map { my $d = dirname($_);
924 my $f = basename($_);
925 (my $l = $f) =~ s/^lib//;
926 " -L$d -l$l" } @{$args{deps}});
927 my $deps = join(" ",compute_lib_depends(@{$args{deps}}));
928 my $shlib_target = $target{shared_target};
929 my $ordinalsfile = defined($args{ordinals}) ? $args{ordinals}->[1] : "";
930 my $target = shlib_simple($lib);
932 # With a build on a Windows POSIX layer (Cygwin or Mingw), we know for a fact
933 # that two files get produced, {shlibname}.dll and {libname}.dll.a.
934 # With all other Unix platforms, we often build a shared library with the
935 # SO version built into the file name and a symlink without the SO version
936 # It's not necessary to have both as targets. The choice falls on the
937 # simplest, {libname}$shlibextimport for Windows POSIX layers and
938 # {libname}$shlibextsimple for the Unix platforms.
939 $target: $lib$libext $deps $ordinalsfile
940 \$(MAKE) -f \$(SRCDIR)/Makefile.shared -e \\
941 PLATFORM=\$(PLATFORM) \\
942 PERL=\$(PERL) SRCDIR='\$(SRCDIR)' DSTDIR="$libd" \\
943 INSTALLTOP='\$(INSTALLTOP)' LIBDIR='\$(LIBDIR)' \\
944 LIBDEPS='\$(PLIB_LDFLAGS) '"$linklibs"' \$(EX_LIBS)' \\
945 LIBNAME=$libname LIBVERSION=\$(SHLIB_MAJOR).\$(SHLIB_MINOR) \\
946 LIBCOMPATVERSIONS=';\$(SHLIB_VERSION_HISTORY)' \\
947 CC='\$(CC)' CFLAGS='\$(CFLAGS) \$(LIB_CFLAGS)' \\
948 CROSS_COMPILE='\$(CROSS_COMPILE)' LDFLAGS='\$(LDFLAGS)' \\
949 SHARED_LDFLAGS='\$(LIB_LDFLAGS)' SHLIB_EXT=$shlibext \\
950 SHARED_RCFLAGS='\$(RCFLAGS)' \\
951 link_shlib.$shlib_target
953 . (windowsdll() ? <<"EOF" : "");
954 rm -f apps/$shlib$shlibext
955 rm -f test/$shlib$shlibext
956 cp -p $shlib$shlibext apps/
957 cp -p $shlib$shlibext test/
962 my $lib = $args{lib};
963 my $libd = dirname($lib);
964 my $libn = basename($lib);
965 (my $libname = $libn) =~ s/^lib//;
966 my $shlibdeps = join("", map { my $d = dirname($_);
967 my $f = basename($_);
968 (my $l = $f) =~ s/^lib//;
969 " -L$d -l$l" } @{$args{deps}});
970 my $deps = join(" ",compute_lib_depends(@{$args{deps}}));
971 my $shlib_target = $target{shared_target};
972 my $objs = join(" ", map { $_.$objext } @{$args{objs}});
973 my $target = dso($lib);
976 \$(MAKE) -f \$(SRCDIR)/Makefile.shared -e \\
977 PLATFORM=\$(PLATFORM) \\
978 PERL=\$(PERL) SRCDIR='\$(SRCDIR)' DSTDIR="$libd" \\
979 LIBDEPS='\$(PLIB_LDFLAGS) '"$shlibdeps"' \$(EX_LIBS)' \\
980 LIBNAME=$libname LDFLAGS='\$(LDFLAGS)' \\
981 CC='\$(CC)' CFLAGS='\$(CFLAGS) \$(DSO_CFLAGS)' \\
982 SHARED_LDFLAGS='\$(DSO_LDFLAGS)' \\
985 link_dso.$shlib_target
990 my $lib = $args{lib};
991 my $objs = join(" ", map { $_.$objext } @{$args{objs}});
995 \$(RANLIB) \$\@ || echo Never mind.
1000 my $bin = $args{bin};
1001 my $bind = dirname($bin);
1002 my $binn = basename($bin);
1003 my $objs = join(" ", map { $_.$objext } @{$args{objs}});
1004 my $deps = join(" ",compute_lib_depends(@{$args{deps}}));
1005 my $linklibs = join("", map { my $d = dirname($_);
1006 my $f = basename($_);
1007 $d = "." if $d eq $f;
1008 (my $l = $f) =~ s/^lib//;
1009 " -L$d -l$l" } @{$args{deps}});
1010 my $shlib_target = $disabled{shared} ? "" : $target{shared_target};
1012 $bin$exeext: $objs $deps
1014 \$(MAKE) -f \$(SRCDIR)/Makefile.shared -e \\
1015 PERL=\$(PERL) SRCDIR=\$(SRCDIR) \\
1016 APPNAME=$bin$exeext OBJECTS="$objs" \\
1017 LIBDEPS='\$(PLIB_LDFLAGS) '"$linklibs"' \$(EX_LIBS)' \\
1018 CC='\$(CC)' CFLAGS='\$(CFLAGS) \$(BIN_CFLAGS)' \\
1019 LDFLAGS='\$(LDFLAGS)' LIBRPATH='\$(INSTALLTOP)/\$(LIBDIR)' \\
1020 link_app.$shlib_target
1025 my $script = $args{script};
1026 my $sources = join(" ", @{$args{sources}});
1027 my $dofile = abs2rel(rel2abs(catfile($config{sourcedir},
1028 "util", "dofile.pl")),
1029 rel2abs($config{builddir}));
1032 \$(PERL) "-I\$(BLDDIR)" -Mconfigdata "$dofile" \\
1033 "-o$target{build_file}" $sources > "$script"
1037 "" # Important! This becomes part of the template result.