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 BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash
90 MISC_SCRIPTS=$(SRCDIR)/tools/c_hash $(SRCDIR)/tools/c_info \
91 $(SRCDIR)/tools/c_issuer $(SRCDIR)/tools/c_name \
92 $(BLDDIR)/apps/CA.pl $(BLDDIR)/apps/tsget
94 SHLIB_INFO={- join(" ", map { "\"".shlib($_).";".shlib_simple($_)."\"" } @{$unified_info{libraries}}) -}
96 # DESTDIR is for package builders so that they can configure for, say,
97 # /usr/ and yet have everything installed to /tmp/somedir/usr/.
98 # Normally it is left empty.
101 # Do not edit these manually. Use Configure with --prefix or --openssldir
102 # to change this! Short explanation in the top comment in Configure
103 INSTALLTOP={- # $prefix is used in the OPENSSLDIR perl snippet
105 our $prefix = $config{prefix} || "/usr/local";
108 # The logic here is that if no --openssldir was given,
109 # OPENSSLDIR will get the value from $prefix plus "/ssl".
110 # If --openssldir was given and the value is an absolute
111 # path, OPENSSLDIR will get its value without change.
112 # If the value from --openssldir is a relative path,
113 # OPENSSLDIR will get $prefix with the --openssldir
114 # value appended as a subdirectory.
116 use File::Spec::Functions;
118 $config{openssldir} ?
119 (file_name_is_absolute($config{openssldir}) ?
121 : catdir($prefix, $config{openssldir}))
122 : catdir($prefix, "ssl");
125 # if $prefix/lib$target{multilib} is not an existing
126 # directory, then assume that it's not searched by linker
127 # automatically, in which case adding $target{multilib} suffix
128 # causes more grief than we're ready to tolerate, so don't...
130 -d "$prefix/lib$target{multilib}" ? $target{multilib} : "";
131 our $libdir = $config{libdir} || "lib$multilib";
133 ENGINESDIR={- use File::Spec::Functions;
134 catdir($prefix,$libdir,"engines") -}
136 MANDIR=$(INSTALLTOP)/share/man
137 DOCDIR=$(INSTALLTOP)/share/doc/$(BASENAME)
138 HTMLDIR=$(DOCDIR)/html
140 # MANSUFFIX is for the benefit of anyone who may want to have a suffix
141 # appended after the manpage file section number. "ssl" is popular,
142 # resulting in files such as config.5ssl rather than config.5.
148 CROSS_COMPILE= {- $config{cross_compile_prefix} -}
149 CC= $(CROSS_COMPILE){- $target{cc} -}
150 CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -}
151 CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
152 LDFLAGS= {- $target{lflags} -}
153 PLIB_LDFLAGS= {- $target{plib_lflags} -}
154 EX_LIBS= {- $target{ex_libs} -} {- $config{ex_libs} -}
155 LIB_CFLAGS={- $target{shared_cflag} || "" -}
156 LIB_LDFLAGS={- $target{shared_ldflag}." ".$config{shared_ldflag}
157 # Unlike other OSes (like Solaris, Linux, Tru64,
158 # IRIX) BSD run-time linkers (tested OpenBSD, NetBSD
159 # and FreeBSD) "demand" RPATH set on .so objects.
160 # Apparently application RPATH is not global and
161 # does not apply to .so linked with other .so.
162 # Problem manifests itself when libssl.so fails to
163 # load libcrypto.so. One can argue that we should
164 # engrave this into Makefile.shared rules or into
165 # BSD-* config lines above. Meanwhile let's try to
166 # be cautious and pass -rpath to linker only when
167 # $prefix is not /usr.
168 . ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
169 ? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
170 RCFLAGS={- $target{shared_rcflag} -}
171 DSO_CFLAGS={- $target{shared_cflag} || "" -}
172 DSO_LDFLAGS=$(LIB_LDFLAGS)
175 PERL={- $config{perl} -}
177 ARFLAGS= {- $target{arflags} -}
178 AR=$(CROSS_COMPILE){- $target{ar} || "ar" -} $(ARFLAGS) r
179 RANLIB= {- $target{ranlib} -}
180 NM= $(CROSS_COMPILE){- $target{nm} || "nm" -}
183 TAR= {- $target{tar} || "tar" -}
184 TARFLAGS= {- $target{tarflags} -}
185 MAKEDEPEND={- $config{makedepprog} -}
188 NAME= $(BASENAME)-$(VERSION)
189 TARFILE= ../$(NAME).tar
191 # We let the C compiler driver to take care of .s files. This is done in
192 # order to be excused from maintaining a separate set of architecture
193 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
194 # gcc, then the driver will automatically translate it to -xarch=v8plus
195 # and pass it down to assembler.
198 PERLASM_SCHEME= {- $target{perlasm_scheme} -}
200 # For x86 assembler: Set PROCESSOR to 386 if you want to support
202 PROCESSOR= {- $config{processor} -}
204 # The main targets ###################################################
206 all: configdata.pm build_libs_nodep build_engines_nodep build_apps_nodep \
209 build_libs: configdata.pm build_libs_nodep depend
210 build_libs_nodep: libcrypto.pc libssl.pc openssl.pc
211 build_engines: configdata.pm build_engines_nodep depend
212 build_engines_nodep: $(ENGINES)
213 build_apps: configdata.pm build_apps_nodep depend
214 build_apps_nodep: $(PROGRAMS) $(SCRIPTS)
215 build_tests: configdata.pm build_tests_nodep depend
216 build_tests_nodep: $(TESTPROGS)
218 test tests: build_tests_nodep build_apps_nodep build_engines_nodep \
220 @ : {- output_off() if $disabled{tests}; "" -}
222 SRCTOP=../$(SRCDIR) \
223 BLDTOP=../$(BLDDIR) \
224 EXE_EXT={- $exeext -} \
225 OPENSSL_ENGINES=../$(BLDDIR)/engines \
226 $(PERL) ../$(SRCDIR)/test/run_tests.pl $(TESTS) )
227 @ : {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
228 @echo "Tests are not supported with your chosen Configure options"
229 @ : {- output_on() if !$disabled{tests}; "" -}
232 @TOP=$(SRCDIR) PERL=$(PERL) $(PERL) $(SRCDIR)/test/run_tests.pl list
235 @set -e; for s in $(SHLIB_INFO); do \
236 s1=`echo "$$s" | cut -f1 -d";"`; \
237 s2=`echo "$$s" | cut -f2 -d";"`; \
240 if [ "$$s1" != "$$s2" ]; then \
247 install: install_sw install_ssldirs install_docs
249 uninstall: uninstall_docs uninstall_sw
252 rm -f $(PROGRAMS) $(TESTPROGS) $(ENGINES) $(SCRIPTS)
254 -rm -f `find . -name '*{- $depext -}'`
255 -rm -f `find . -name '*{- $objext -}'`
258 rm -f openssl.pc libcrypto.pc libssl.pc
259 -rm -f `find . -type l`
262 # This exists solely for those who still type 'make depend'
264 # We check if any depfile is newer than Makefile and decide to
265 # concatenate only if that is true.
267 @: {- output_off() if $disabled{makedepend}; "" -}
268 @if [ -n "`find $(DEPS) -newer Makefile 2>/dev/null; exit 0`" ]; then \
269 ( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
270 echo '# DO NOT DELETE THIS LINE -- make depend depends on it.'; \
272 for f in $(DEPS); do \
273 if [ -f $$f ]; then cat $$f; fi; \
274 done ) > Makefile.new; \
275 if cmp Makefile.new Makefile >/dev/null 2>&1; then \
276 rm -f Makefile.new; \
278 mv -f Makefile.new Makefile; \
281 @: {- output_on() if $disabled{makedepend}; "" -}
283 # Install helper targets #############################################
285 install_sw: all install_dev install_engines install_runtime
287 uninstall_sw: uninstall_runtime uninstall_engines uninstall_dev
289 install_docs: install_man_docs install_html_docs
291 uninstall_docs: uninstall_man_docs uninstall_html_docs
292 $(RM) -r -v $(DESTDIR)$(DOCDIR)
295 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/certs
296 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/private
299 @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
300 @echo "*** Installing development files"
301 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/include/openssl
302 @set -e; for i in $(SRCDIR)/include/openssl/*.h \
303 $(BLDDIR)/include/openssl/*.h; do \
305 echo "install $$i -> $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn"; \
306 cp $$i $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn; \
307 chmod 644 $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn; \
309 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)
310 @set -e; for l in $(LIBS); do \
312 echo "install $$l -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
313 cp $$l $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
314 $(RANLIB) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
315 chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
316 mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new \
317 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
319 @ : {- output_off() if $disabled{shared}; "" -}
320 @set -e; for s in $(SHLIB_INFO); do \
321 s1=`echo "$$s" | cut -f1 -d";"`; \
322 s2=`echo "$$s" | cut -f2 -d";"`; \
323 fn1=`basename $$s1`; \
324 fn2=`basename $$s2`; \
325 : {- output_off() if windowsdll(); "" -}; \
326 echo "install $$s1 -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1"; \
327 cp $$s1 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1.new; \
328 chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1.new; \
329 mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1.new \
330 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1; \
331 if [ "$$fn1" != "$$fn2" ]; then \
332 echo "link $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2 -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1"; \
333 ln -sf $$fn1 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
335 : {- output_on() if windowsdll(); "" -}{- output_off() unless windowsdll(); "" -}; \
336 echo "install $$s2 -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2"; \
337 cp $$s2 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2.new; \
338 chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2.new; \
339 mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2.new \
340 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
341 : {- output_on() unless windowsdll(); "" -}; \
343 @ : {- output_on() if $disabled{shared}; "" -}
344 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
345 @echo "install libcrypto.pc -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc"
346 @cp libcrypto.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
347 @chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
348 @echo "install libssl.pc -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc"
349 @cp libssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
350 @chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
351 @echo "install openssl.pc -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc"
352 @cp openssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
353 @chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
356 @echo "*** Uninstalling development files"
357 @set -e; for i in $(SRCDIR)/include/openssl/*.h \
358 $(BLDDIR)/include/openssl/*.h; do \
360 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn"; \
361 $(RM) $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn; \
363 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/include/openssl
364 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/include
365 @set -e; for l in $(LIBS); do \
367 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
368 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
370 @ : {- output_off() if $disabled{shared}; "" -}
371 @set -e; for s in $(SHLIB_INFO); do \
372 s1=`echo "$$s" | cut -f1 -d";"`; \
373 s2=`echo "$$s" | cut -f2 -d";"`; \
374 fn1=`basename $$s1`; \
375 fn2=`basename $$s2`; \
376 : {- output_off() if windowsdll(); "" -}; \
377 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1"; \
378 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn1; \
379 if [ "$$fn1" != "$$fn2" ]; then \
380 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2"; \
381 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
383 : {- output_on() if windowsdll(); "" -}{- output_off() unless windowsdll(); "" -}; \
384 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2"; \
385 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
386 : {- output_on() unless windowsdll(); "" -}; \
388 @ : {- output_on() if $disabled{shared}; "" -}
389 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
390 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
391 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
392 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
393 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)
396 @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
397 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/
398 @echo "*** Installing engines"
399 @set -e; for e in dummy $(ENGINES); do \
400 if [ "$$e" = "dummy" ]; then continue; fi; \
402 if [ "$$fn" = '{- dso("ossltest") -}' ]; then \
405 echo "install $$e -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn"; \
406 cp $$e $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new; \
407 chmod 755 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new; \
408 mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new \
409 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn; \
413 @echo "*** Uninstalling engines"
414 @set -e; for e in dummy $(ENGINES); do \
415 if [ "$$e" = "dummy" ]; then continue; fi; \
417 if [ "$$fn" = '{- dso("ossltest") -}' ]; then \
420 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn"; \
421 $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn; \
423 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines
426 @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
427 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/bin
428 @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/misc
429 @echo "*** Installing runtime files"
430 : {- output_off() unless windowsdll(); "" -};
431 @set -e; for s in dummy $(SHLIBS); do \
432 if [ "$$s" = "dummy" ]; then continue; fi; \
434 echo "install $$s -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
435 cp $$s $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
436 chmod 644 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
437 mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \
438 $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
440 : {- output_on() unless windowsdll(); "" -};
441 @set -e; for x in dummy $(PROGRAMS); do \
442 if [ "$$x" = "dummy" ]; then continue; fi; \
444 echo "install $$x -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
445 cp $$x $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
446 chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
447 mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \
448 $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
450 @set -e; for x in dummy $(BIN_SCRIPTS); do \
451 if [ "$$x" = "dummy" ]; then continue; fi; \
453 echo "install $$x -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
454 cp $$x $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
455 chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
456 mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \
457 $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
459 @set -e; for x in dummy $(MISC_SCRIPTS); do \
460 if [ "$$x" = "dummy" ]; then continue; fi; \
462 echo "install $$x -> $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \
463 cp $$x $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \
464 chmod 755 $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \
465 mv -f $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new \
466 $(DESTDIR)$(OPENSSLDIR)/misc/$$fn; \
468 @echo "install $(SRCDIR)/apps/openssl.cnf -> $(DESTDIR)$(OPENSSLDIR)/openssl.cnf"
469 @cp $(SRCDIR)/apps/openssl.cnf $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new
470 @chmod 644 $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new
471 @mv -f $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
474 @echo "*** Uninstalling runtime files"
475 @set -e; for x in dummy $(PROGRAMS); \
477 if [ "$$x" = "dummy" ]; then continue; fi; \
479 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
480 $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
482 @set -e; for x in dummy $(BIN_SCRIPTS); \
484 if [ "$$x" = "dummy" ]; then continue; fi; \
486 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
487 $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
489 @set -e; for x in dummy $(MISC_SCRIPTS); \
491 if [ "$$x" = "dummy" ]; then continue; fi; \
493 echo "$(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \
494 $(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$fn; \
496 : {- output_off() unless windowsdll(); "" -};
497 @set -e; for s in dummy $(SHLIBS); do \
498 if [ "$$s" = "dummy" ]; then continue; fi; \
500 echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
501 $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
503 : {- output_on() unless windowsdll(); "" -};
504 $(RM) $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
505 -$(RMDIR) $(DESTDIR)$(INSTALLTOP)/bin
506 -$(RMDIR) $(DESTDIR)$(OPENSSLDIR)/misc
508 # A method to extract all names from a .pod file
509 # The first sed extracts everything between "=head1 NAME" and the next =head1
510 # The perl command joins all the lines into one
511 # The second sed removes the description and turns all commas into spaces
512 # Voilà , you have a space separated list of names!
513 EXTRACT_NAMES=sed -e '1,/^=head1 *NAME *$$/d;/^=head1/,$$d' | \
514 $(PERL) -p -0 -e 's/\n/ /g; END {print "\n"}' | \
515 sed -e 's/ - .*$$//;s/,/ /g'
518 here=`cd $(SRCDIR); pwd`; \
519 point=$$here/util/point.sh; \
520 for ds in apps:1 crypto:3 ssl:3; do \
521 defdir=`echo $$ds | cut -f1 -d:`; \
522 defsec=`echo $$ds | cut -f2 -d:`; \
523 for p in $(SRCDIR)/doc/$$defdir/*.pod; do \
524 SEC=`sed -ne 's/^=for *comment *openssl_manual_section: *\([0-9]\) *$$/\1/p' $$p`; \
525 [ -z "$$SEC" ] && SEC=$$defsec; \
526 fn=`basename $$p .pod`; \
527 NAME=`echo $$fn | tr [a-z] [A-Z]`; \
528 suf=`eval "echo $$OUTSUFFIX"`; \
529 top=`eval "echo $$OUTTOP"`; \
530 $(PERL) $(SRCDIR)/util/mkdir-p.pl $$top/man$$SEC; \
531 echo "install $$p -> $$top/man$$SEC/$$fn$$suf"; \
532 cat $$p | eval "$$GENERATE" \
533 > $$top/man$$SEC/$$fn$$suf; \
534 names=`cat $$p | $(EXTRACT_NAMES)`; \
535 ( cd $$top/man$$SEC; \
536 for n in $$names; do \
539 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
540 comp_n=`echo "$$n" | tr [A-Z] [a-z]`; \
541 comp_fn=`echo "$$fn" | tr [A-Z] [a-z]`; \
544 if [ "$$comp_n" != "$$comp_fn" ]; then \
545 echo "link $$top/man$$SEC/$$n$$suf -> $$top/man$$SEC/$$fn$$suf"; \
546 PLATFORM=$(PLATFORM) $$point $$fn$$suf $$n$$suf; \
553 here=`cd $(SRCDIR); pwd`; \
554 for ds in apps:1 crypto:3 ssl:3; do \
555 defdir=`echo $$ds | cut -f1 -d:`; \
556 defsec=`echo $$ds | cut -f2 -d:`; \
557 for p in $(SRCDIR)/doc/$$defdir/*.pod; do \
558 SEC=`sed -ne 's/^=for *comment *openssl_manual_section: *\([0-9]\) *$$/\1/p' $$p`; \
559 [ -z "$$SEC" ] && SEC=$$defsec; \
560 fn=`basename $$p .pod`; \
561 suf=`eval "echo $$OUTSUFFIX"`; \
562 top=`eval "echo $$OUTTOP"`; \
563 echo "$(RM) $$top/man$$SEC/$$fn$$suf"; \
564 $(RM) $$top/man$$SEC/$$fn$$suf; \
565 names=`cat $$p | $(EXTRACT_NAMES)`; \
566 for n in $$names; do \
569 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
570 comp_n=`echo "$$n" | tr [A-Z] [a-z]`; \
571 comp_fn=`echo "$$fn" | tr [A-Z] [a-z]`; \
574 if [ "$$comp_n" != "$$comp_fn" ]; then \
575 echo "$(RM) $$top/man$$SEC/$$n$$suf"; \
576 $(RM) $$top/man$$SEC/$$n$$suf; \
579 ( $(RMDIR) $$top/man$$SEC 2>/dev/null || exit 0 ); \
584 @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
585 @echo "*** Installing manpages"
587 OUTSUFFIX='.$${SEC}$(MANSUFFIX)'; \
588 OUTTOP="$(DESTDIR)$(MANDIR)"; \
589 GENERATE='pod2man --name=$$NAME --section=$$SEC --center=OpenSSL --release=$(VERSION)'; \
593 @echo "*** Uninstalling manpages"
595 OUTSUFFIX='.$${SEC}$(MANSUFFIX)'; \
596 OUTTOP="$(DESTDIR)$(MANDIR)"; \
600 @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
601 @echo "*** Installing HTML manpages"
603 OUTSUFFIX='.$(HTMLSUFFIX)'; \
604 OUTTOP="$(DESTDIR)$(HTMLDIR)"; \
605 GENERATE="pod2html --podroot=$(SRCDIR)/doc --htmldir=.. \
606 --podpath=apps:crypto:ssl \
607 | sed -e 's|href=\"http://man.he.net/man|href=\"../man|g'"; \
611 @echo "*** Uninstalling manpages"
613 OUTSUFFIX='.$(HTMLSUFFIX)'; \
614 OUTTOP="$(DESTDIR)$(HTMLDIR)"; \
618 # Developer targets (note: these are only available on Unix) #########
620 update: generate errors ordinals
622 generate: generate_apps generate_crypto_bn generate_crypto_objects
624 # Test coverage is a good idea for the future
625 #coverage: $(PROGRAMS) $(TESTPROGRAMS)
628 # Currently disabled, util/selftest.pl needs a rewrite
630 # SRCDIR=$(SRCDIR) @$(PERL) util/selftest.pl
633 lint -DLINT $(INCLUDES) $(SRCS)
635 {- # because the program apps/openssl has object files as sources, and
636 # they then have the corresponding C files as source, we need to chain
637 # the lookups in %unified_info
638 my $apps_openssl = catfile("apps","openssl");
639 our @openssl_source = map { @{$unified_info{sources}->{$_}} }
640 @{$unified_info{sources}->{$apps_openssl}};
643 ( cd $(SRCDIR); $(PERL) VMS/VMSify-conf.pl \
644 < apps/openssl.cnf > apps/openssl-vms.cnf )
645 ( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b apps/progs.pl \
646 {- join(" ", @openssl_source) -} \
650 ( cd $(SRCDIR); $(PERL) crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
652 generate_crypto_objects:
653 ( cd $(SRCDIR); $(PERL) crypto/objects/obj_dat.pl \
654 include/openssl/obj_mac.h \
655 crypto/objects/obj_dat.h )
656 ( cd $(SRCDIR); $(PERL) crypto/objects/objects.pl \
657 crypto/objects/objects.txt \
658 crypto/objects/obj_mac.num \
659 include/openssl/obj_mac.h )
660 ( cd $(SRCDIR); $(PERL) crypto/objects/objxref.pl \
661 crypto/objects/obj_mac.num \
662 crypto/objects/obj_xref.txt \
663 > crypto/objects/obj_xref.h )
666 ( cd $(SRCDIR); $(PERL) util/ck_errf.pl -strict */*.c */*/*.c )
667 ( cd $(SRCDIR); $(PERL) util/mkerr.pl -recurse -write )
668 ( cd $(SRCDIR)/engines; \
670 $(PERL) ../util/mkerr.pl -conf $$e \
671 -nostatic -staticloader -write *.c; \
675 ( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mkdef.pl crypto update )
676 ( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mkdef.pl ssl update )
680 SRCTOP=../$(SRCDIR) \
681 BLDTOP=../$(BLDDIR) \
682 $(PERL) ../$(SRCDIR)/test/run_tests.pl test_ordinals )
687 -etags `find . -name '*.[ch]' -o -name '*.pm'`
689 # Release targets (note: only available on Unix) #####################
691 TAR_COMMAND=$(TAR) $(TARFLAGS) --owner 0 --group 0 -cvf -
694 TMPDIR=/var/tmp/openssl-copy.$$$$; \
696 mkdir -p $$TMPDIR/$$DISTDIR; \
698 git ls-tree -r --name-only --full-tree HEAD \
700 mkdir -p $$TMPDIR/$$DISTDIR/`dirname $$F`; \
701 cp $$F $$TMPDIR/$$DISTDIR/$$F; \
705 find $$TMPDIR/$$DISTDIR -type d -print | xargs chmod 755; \
706 find $$TMPDIR/$$DISTDIR -type f -print | xargs chmod a+r; \
707 find $$TMPDIR/$$DISTDIR -type f -perm -0100 -print | xargs chmod a+x; \
708 $(TAR_COMMAND) $$DISTDIR) \
709 | (cd $(SRCDIR); gzip --best > $(TARFILE).gz); \
711 cd $(SRCDIR); ls -l $(TARFILE).gz
714 @$(MAKE) PREPARE_CMD='./Configure dist' tar
716 # Helper targets #####################################################
718 link-utils: $(BLDDIR)/util/opensslwrap.sh $(BLDDIR)/util/shlib_wrap.sh
720 $(BLDDIR)/util/opensslwrap.sh: configdata.pm
721 @if [ "$(SRCDIR)" != "$(BLDDIR)" ]; then \
722 mkdir -p "$(BLDDIR)/util"; \
723 ln -sf "../$(SRCDIR)/util/opensslwrap.sh" "$(BLDDIR)/util"; \
725 $(BLDDIR)/util/shlib_wrap.sh: configdata.pm
726 @if [ "$(SRCDIR)" != "$(BLDDIR)" ]; then \
727 mkdir -p "$(BLDDIR)/util"; \
728 ln -sf "../$(SRCDIR)/util/shlib_wrap.sh" "$(BLDDIR)/util"; \
732 # Building targets ###################################################
734 libcrypto.pc libssl.pc openssl.pc: configdata.pm $(LIBS)
736 @ ( echo 'prefix=$(INSTALLTOP)'; \
737 echo 'exec_prefix=$${prefix}'; \
738 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
739 echo 'includedir=$${prefix}/include'; \
741 echo 'Name: OpenSSL-libcrypto'; \
742 echo 'Description: OpenSSL cryptography library'; \
743 echo 'Version: '$(VERSION); \
744 echo 'Libs: -L$${libdir} -lcrypto'; \
745 echo 'Libs.private: $(EX_LIBS)'; \
746 echo 'Cflags: -I$${includedir}' ) > libcrypto.pc
749 @ ( echo 'prefix=$(INSTALLTOP)'; \
750 echo 'exec_prefix=$${prefix}'; \
751 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
752 echo 'includedir=$${prefix}/include'; \
754 echo 'Name: OpenSSL-libssl'; \
755 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
756 echo 'Version: '$(VERSION); \
757 echo 'Requires.private: libcrypto'; \
758 echo 'Libs: -L$${libdir} -lssl'; \
759 echo 'Libs.private: $(EX_LIBS)'; \
760 echo 'Cflags: -I$${includedir}' ) > libssl.pc
763 @ ( echo 'prefix=$(INSTALLTOP)'; \
764 echo 'exec_prefix=$${prefix}'; \
765 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
766 echo 'includedir=$${prefix}/include'; \
768 echo 'Name: OpenSSL'; \
769 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
770 echo 'Version: '$(VERSION); \
771 echo 'Requires: libssl libcrypto' ) > openssl.pc
773 # Note on the use of $(MFLAGS): this was an older variant of MAKEFLAGS which
774 # wasn't passed down automatically. It's quite safe to use it like we do
775 # below; if it doesn't exist, the result will be empty and 'make' will pick
776 # up $(MAKEFLAGS) which is passed down as an environment variable.
777 configdata.pm: $(SRCDIR)/Configurations/unix-Makefile.tmpl $(SRCDIR)/Configurations/common.tmpl $(SRCDIR)/Configure $(SRCDIR)/config {- join(" ", @{$config{build_infos}}) -}
778 @echo "Detected changed: $?"
779 @echo "Reconfiguring..."
780 $(SRCDIR)/Configure reconf
781 @echo "**************************************************"
783 @echo "*** Please run the same make command again ***"
785 @echo "**************************************************"
790 use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs/;
792 # Helper function to figure out dependencies on libraries
793 # It takes a list of library names and outputs a list of dependencies
794 sub compute_lib_depends {
795 if ($disabled{shared}) {
796 return map { $_.$libext } @_;
799 # Depending on shared libraries:
800 # On Windows POSIX layers, we depend on {libname}.dll.a
801 # On Unix platforms, we depend on {shlibname}.so
802 return map { shlib_simple($_) } @_;
807 my $generator = join(" ", @{$args{generator}});
808 my $incs = join("", map { " -I".$_ } @{$args{incs}});
809 my $deps = join(" ", @{$args{deps}});
811 if ($args{src} !~ /\.[sS]$/) {
813 $args{src}: $args{generator}->[0] $deps
814 \$(PERL) $generator > \$@
817 if ($args{generator}->[0] =~ /\.pl$/) {
818 $generator = 'CC="$(CC)" $(PERL) '.$generator;
819 } elsif ($args{generator}->[0] =~ /\.m4$/) {
820 $generator = 'm4 -B 8192 '.$generator.' >'
821 } elsif ($args{generator}->[0] =~ /\.S$/) {
824 die "Generator type for $args{src} unknown: $generator\n";
827 if (defined($generator)) {
828 # If the target is named foo.S in build.info, we want to
829 # end up generating foo.s in two steps.
830 if ($args{src} =~ /\.S$/) {
831 (my $target = $args{src}) =~ s|\.S$|.s|;
833 $target: $args{generator}->[0] $deps
834 ( trap "rm -f \$@.*" INT 0; \\
836 \$(CC) \$(CFLAGS) $incs -E -P \$@.S > \$@.i && mv -f \$@.i \$@ )
841 $args{src}: $args{generator}->[0] $deps
846 $args{src}: $args{generator}->[0] $deps
847 \$(CC) \$(CFLAGS) $incs -E -P \$< > \$@
852 # Should one wonder about the end of the Perl snippet, it's because this
853 # second regexp eats up line endings as well, if the removed path is the
854 # last in the line. We may therefore need to put back a line ending.
857 my $obj = $args{obj};
858 my @srcs = map { if ($unified_info{generate}->{$_}) {
859 (my $x = $_) =~ s/\.S$/.s/; $x
863 } ( @{$args{srcs}} );
864 my $srcs = join(" ", @srcs);
865 my $deps = join(" ", @srcs, @{$args{deps}});
866 my $incs = join("", map { " -I".$_ } @{$args{incs}});
867 unless ($disabled{zlib}) {
868 if ($withargs{zlib_include}) {
869 $incs .= " -I".$withargs{zlib_include};
872 my $ecflags = { lib => '$(LIB_CFLAGS)',
873 dso => '$(DSO_CFLAGS)',
874 bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
875 my $makedepprog = $config{makedepprog};
877 if (!$disabled{makedepend} && $makedepprog =~ /\/makedepend/) {
880 -\$(MAKEDEPEND) -f- -o"|$obj$objext" -- \$(CFLAGS) $ecflags$incs -- $srcs \\
881 >\$\@.tmp 2>/dev/null
882 -\$(PERL) -i -pe 's/^.*\\|//; s/ \\/(\\\\.|[^ ])*//; \$\$_ = undef if (/: *\$\$/ || /^(#.*| *)\$\$/); \$\$_.="\\n" unless !defined(\$\$_) or /\\R\$\$/g;' \$\@.tmp
883 \@if cmp \$\@.tmp \$\@ > /dev/null 2> /dev/null; then \\
889 $deps = $obj.$depext;
891 if ($disabled{makedepend} || $makedepprog =~ /\/makedepend/) {
894 \$(CC) \$(CFLAGS) $ecflags$incs -c -o \$\@ $srcs
897 if (!$disabled{makedepend} && $makedepprog !~ /\/makedepend/) {
900 \$(CC) \$(CFLAGS) $ecflags$incs -MMD -MF $obj$depext.tmp -MT \$\@ -c -o \$\@ $srcs
901 \@touch $obj$depext.tmp
902 \@if cmp $obj$depext.tmp $obj$depext > /dev/null 2> /dev/null; then \\
903 rm -f $obj$depext.tmp; \\
905 mv $obj$depext.tmp $obj$depext; \\
911 # On Unix, we build shlibs from static libs, so we're ignoring the
912 # object file array. We *know* this routine is only called when we've
913 # configure 'shared'.
916 my $lib = $args{lib};
917 my $shlib = $args{shlib};
918 my $libd = dirname($lib);
919 my $libn = basename($lib);
920 (my $libname = $libn) =~ s/^lib//;
921 my $linklibs = join("", map { my $d = dirname($_);
922 my $f = basename($_);
923 (my $l = $f) =~ s/^lib//;
924 " -L$d -l$l" } @{$args{deps}});
925 my $deps = join(" ",compute_lib_depends(@{$args{deps}}));
926 my $shlib_target = $target{shared_target};
927 my $ordinalsfile = defined($args{ordinals}) ? $args{ordinals}->[1] : "";
928 my $target = shlib_simple($lib);
930 # With a build on a Windows POSIX layer (Cygwin or Mingw), we know for a fact
931 # that two files get produced, {shlibname}.dll and {libname}.dll.a.
932 # With all other Unix platforms, we often build a shared library with the
933 # SO version built into the file name and a symlink without the SO version
934 # It's not necessary to have both as targets. The choice falls on the
935 # simplest, {libname}$shlibextimport for Windows POSIX layers and
936 # {libname}$shlibextsimple for the Unix platforms.
937 $target: $lib$libext $deps $ordinalsfile
938 \$(MAKE) -f \$(SRCDIR)/Makefile.shared -e \\
939 PLATFORM=\$(PLATFORM) \\
940 PERL=\$(PERL) SRCDIR='\$(SRCDIR)' DSTDIR="$libd" \\
941 INSTALLTOP='\$(INSTALLTOP)' LIBDIR='\$(LIBDIR)' \\
942 LIBDEPS='\$(PLIB_LDFLAGS) '"$linklibs"' \$(EX_LIBS)' \\
943 LIBNAME=$libname LIBVERSION=\$(SHLIB_MAJOR).\$(SHLIB_MINOR) \\
944 LIBCOMPATVERSIONS=';\$(SHLIB_VERSION_HISTORY)' \\
945 CC='\$(CC)' CFLAGS='\$(CFLAGS) \$(LIB_CFLAGS)' \\
946 CROSS_COMPILE='\$(CROSS_COMPILE)' LDFLAGS='\$(LDFLAGS)' \\
947 SHARED_LDFLAGS='\$(LIB_LDFLAGS)' SHLIB_EXT=$shlibext \\
948 SHARED_RCFLAGS='\$(RCFLAGS)' \\
949 link_shlib.$shlib_target
951 . (windowsdll() ? <<"EOF" : "");
952 rm -f apps/$shlib$shlibext
953 rm -f test/$shlib$shlibext
954 cp -p $shlib$shlibext apps/
955 cp -p $shlib$shlibext test/
960 my $lib = $args{lib};
961 my $libd = dirname($lib);
962 my $libn = basename($lib);
963 (my $libname = $libn) =~ s/^lib//;
964 my $shlibdeps = join("", map { my $d = dirname($_);
965 my $f = basename($_);
966 (my $l = $f) =~ s/^lib//;
967 " -L$d -l$l" } @{$args{deps}});
968 my $deps = join(" ",compute_lib_depends(@{$args{deps}}));
969 my $shlib_target = $target{shared_target};
970 my $objs = join(" ", map { $_.$objext } @{$args{objs}});
971 my $target = dso($lib);
974 \$(MAKE) -f \$(SRCDIR)/Makefile.shared -e \\
975 PLATFORM=\$(PLATFORM) \\
976 PERL=\$(PERL) SRCDIR='\$(SRCDIR)' DSTDIR="$libd" \\
977 LIBDEPS='\$(PLIB_LDFLAGS) '"$shlibdeps"' \$(EX_LIBS)' \\
978 LIBNAME=$libname LDFLAGS='\$(LDFLAGS)' \\
979 CC='\$(CC)' CFLAGS='\$(CFLAGS) \$(DSO_CFLAGS)' \\
980 SHARED_LDFLAGS='\$(DSO_LDFLAGS)' \\
983 link_dso.$shlib_target
988 my $lib = $args{lib};
989 my $objs = join(" ", map { $_.$objext } @{$args{objs}});
993 \$(RANLIB) \$\@ || echo Never mind.
998 my $bin = $args{bin};
999 my $bind = dirname($bin);
1000 my $binn = basename($bin);
1001 my $objs = join(" ", map { $_.$objext } @{$args{objs}});
1002 my $deps = join(" ",compute_lib_depends(@{$args{deps}}));
1003 my $linklibs = join("", map { my $d = dirname($_);
1004 my $f = basename($_);
1005 $d = "." if $d eq $f;
1006 (my $l = $f) =~ s/^lib//;
1007 " -L$d -l$l" } @{$args{deps}});
1008 my $shlib_target = $disabled{shared} ? "" : $target{shared_target};
1010 $bin$exeext: $objs $deps
1012 \$(MAKE) -f \$(SRCDIR)/Makefile.shared -e \\
1013 PERL=\$(PERL) SRCDIR=\$(SRCDIR) \\
1014 APPNAME=$bin$exeext OBJECTS="$objs" \\
1015 LIBDEPS='\$(PLIB_LDFLAGS) '"$linklibs"' \$(EX_LIBS)' \\
1016 CC='\$(CC)' CFLAGS='\$(CFLAGS) \$(BIN_CFLAGS)' \\
1017 LDFLAGS='\$(LDFLAGS)' LIBRPATH='\$(INSTALLTOP)/\$(LIBDIR)' \\
1018 link_app.$shlib_target
1023 my $script = $args{script};
1024 my $sources = join(" ", @{$args{sources}});
1025 my $dofile = abs2rel(rel2abs(catfile($config{sourcedir},
1026 "util", "dofile.pl")),
1027 rel2abs($config{builddir}));
1030 \$(PERL) "-I\$(BLDDIR)" -Mconfigdata "$dofile" \\
1031 "-o$target{build_file}" $sources > "$script"
1035 "" # Important! This becomes part of the template result.