# Copyright (c) 2012 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # use strict; require 5.005; use ExtUtils::MakeMaker (); my(@_EXE_FILES) = ('bin/b-backup', 'bin/b-class', 'bin/b-crm', 'bin/b-csv', 'bin/b-darwin-config', 'bin/b-dav', 'bin/b-dev', 'bin/b-disk', 'bin/b-docbook', 'bin/b-ftpd', 'bin/b-host', 'bin/b-http-conf', 'bin/b-http-log', 'bin/b-http-ping', 'bin/b-httpd', 'bin/b-linux-config', 'bin/b-list-model', 'bin/b-otp', 'bin/b-pod', 'bin/b-realm-admin', 'bin/b-realm-file', 'bin/b-realm-mail', 'bin/b-realm-role', 'bin/b-release', 'bin/b-row-tag', 'bin/b-search', 'bin/b-secret', 'bin/b-sendmail-http', 'bin/b-shell', 'bin/b-site-forum', 'bin/b-sql', 'bin/b-ssl', 'bin/b-test', 'bin/b-test-realm', 'bin/b-test-user', 'bin/b-user', 'bin/b-wiki', 'bin/bivio', 'bin/pet-sql'); ExtUtils::MakeMaker::WriteMakefile( NAME => 'Bivio-bOP', EXE_FILES => \@_EXE_FILES, AUTHOR => 'bivio Software, Inc. www.bivio.biz', dist => {COMPRESS => 'gzip -f', SUFFIX => 'gz'}, ABSTRACT => 'bivio OLTP Web Platform', VERSION_FROM => 'lib/Bivio/bOP.pm', PREREQ_PM => {} , ); sub MY::postamble { # There's a better way, but I'm too lazy to get this to work right. my($libs) = ''; foreach my $l (qw(socket nsl)) { $libs .= ' -l'.$l if -r "/usr/lib/lib$l.a"; } return "BIVIO_C_LIBS=$libs\n".<<'END'; bin/b-sendmail-http:: bin/b-sendmail-http.c gcc -g -O -ansi -Wall -o bin/b-sendmail-http bin/b-sendmail-http.c $(BIVIO_C_LIBS) END }