Removed the kroc C wrapper file (kroc-wrapper-c.c) in favour of tacking it onto the end of each C file we create (to better facilitate all-in-one compilation)
This commit is contained in:
parent
85fdfe7af7
commit
32fa80be0f
|
@ -29,7 +29,7 @@ CompilerCommands.hs: Makefile
|
|||
echo -e 'cAsmCommand :: String -> String -> String\n' >> CompilerCommands.hs
|
||||
echo -e 'cAsmCommand inp out = "$(CC) $(TOCK_CFLAGS) -x c -S -o " ++ out ++ " " ++ inp\n' >> CompilerCommands.hs
|
||||
echo -e 'krocLinkCommand :: String -> String -> String -> String\n'
|
||||
echo -e 'krocLinkCommand fileA fileB out = "kroc -o " ++ out ++ " kroc-wrapper.occ " ++ fileA ++ " " ++ fileB ++ " kroc-wrapper-c.o -lcif"\n' >> CompilerCommands.hs
|
||||
echo -e 'krocLinkCommand fileA fileB out = "kroc -o " ++ out ++ " kroc-wrapper.occ " ++ fileA ++ " " ++ fileB ++ " -lcif"\n' >> CompilerCommands.hs
|
||||
echo -e 'cxxCommand :: String -> String -> String\n' >> CompilerCommands.hs
|
||||
echo -e 'cxxCommand inp out = "$(CXX) $(TOCK_CXXFLAGS) -x c++ -o " ++ out ++ " " ++ inp\n' >> CompilerCommands.hs
|
||||
|
||||
|
|
|
@ -289,6 +289,13 @@ cgenTopLevel ops p
|
|||
sequence_ [tell [", "] >> call genTLPChannel ops c | (_,c) <- chans]
|
||||
tell [");\n"]
|
||||
tell ["}\n"]
|
||||
|
||||
tell ["void _tock_main_init (int *ws) {"]
|
||||
tell ["Process *p = ProcAlloc (tock_main, 65536, 3,"]
|
||||
tell ["(Channel *) ws[1], (Channel *) ws[2], (Channel *) ws[3]);"]
|
||||
tell ["*((int *) ws[0]) = (int) p;"]
|
||||
tell ["}"]
|
||||
tell ["void _tock_main_free (int *ws) {ProcAllocClean ((Process *) ws[0]);}"]
|
||||
--}}}
|
||||
|
||||
--{{{ utilities
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* KRoC wrapper to run Tock-generated CIF program
|
||||
* Copyright (C) 2007 University of Kent
|
||||
*
|
||||
* 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 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <cifccsp.h>
|
||||
|
||||
extern void tock_main (Process *me, Channel *in, Channel *out, Channel *err);
|
||||
|
||||
void _tock_main_init (int *ws) {
|
||||
Process *p = ProcAlloc (tock_main, 65536, 3,
|
||||
(Channel *) ws[1], (Channel *) ws[2], (Channel *) ws[3]);
|
||||
*((int *) ws[0]) = (int) p;
|
||||
}
|
||||
|
||||
void _tock_main_free (int *ws) {
|
||||
ProcAllocClean ((Process *) ws[0]);
|
||||
}
|
Loading…
Reference in New Issue
Block a user