Mercurial > urweb
comparison src/compiler.sml @ 1132:d4cd54a4ea06
First attempt to switch to Automake, to get shared libraries built in OSX
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 28 Jan 2010 09:56:08 -0500 |
parents | c01fb6f1b31f |
children | 7fdea74b1dd9 |
comparison
equal
deleted
inserted
replaced
1131:94e83c5533d2 | 1132:d4cd54a4ea06 |
---|---|
1 (* Copyright (c) 2008-2009, Adam Chlipala | 1 (* Copyright (c) 2008-2010, Adam Chlipala |
2 * All rights reserved. | 2 * All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are met: | 5 * modification, are permitted provided that the following conditions are met: |
6 * | 6 * |
1038 fun compileC {cname, oname, ename, libs, profile, debug, link = link'} = | 1038 fun compileC {cname, oname, ename, libs, profile, debug, link = link'} = |
1039 let | 1039 let |
1040 val proto = Settings.currentProtocol () | 1040 val proto = Settings.currentProtocol () |
1041 | 1041 |
1042 val lib = if Settings.getStaticLinking () then | 1042 val lib = if Settings.getStaticLinking () then |
1043 clibFile "request.o" ^ " " ^ clibFile "queue.o" ^ " " ^ clibFile "urweb.o" | 1043 #linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a" |
1044 ^ " " ^ clibFile "memmem.o" ^ " " ^ clibFile "mhash.o" ^ " " ^ #linkStatic proto | |
1045 else | 1044 else |
1046 "-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto | 1045 "-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto |
1047 | 1046 |
1048 val compile = "gcc " ^ Config.gccArgs ^ " -Wimplicit -Werror -O3 -fno-inline -I " ^ Config.includ | 1047 val compile = "gcc " ^ Config.gccArgs ^ " -Wimplicit -Werror -O3 -fno-inline -I " ^ Config.includ |
1049 ^ " " ^ #compile proto | 1048 ^ " " ^ #compile proto |