Unverified Commit a41a9108 by sterin Committed by GitHub

Merge pull request #8 from sterin/master

Travis: build with namespaces enabled
parents 1fc200ff dc4320d7
...@@ -9,6 +9,15 @@ matrix: ...@@ -9,6 +9,15 @@ matrix:
packages: packages:
- libreadline-dev - libreadline-dev
- os: linux
addons:
apt:
packages:
- libreadline-dev
env:
MAKE_ARGS: ABC_USE_NAMESPACE=xxx
DEMO_ARGS: -DABC_NAMESPACE=xxx
- os: osx - os: osx
osx_image: xcode8 osx_image: xcode8
before_install: before_install:
...@@ -17,10 +26,10 @@ matrix: ...@@ -17,10 +26,10 @@ matrix:
script: script:
- make -j2 abc - make ${MAKE_ARGS} -j2 abc
- ./abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec" - ./abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec"
- make libabc.a - make ${MAKE_ARGS} libabc.a
- gcc -Wall -c src/demo.c -o demo.o - g++ ${DEMO_ARGS} -Wall -c src/demo.c -o demo.o
- g++ -o demo demo.o libabc.a -lm -ldl -lreadline -lpthread - g++ -o demo demo.o libabc.a -lm -ldl -lreadline -lpthread
- ./demo i10.aig - ./demo i10.aig
...@@ -25,14 +25,31 @@ ...@@ -25,14 +25,31 @@
/// DECLARATIONS /// /// DECLARATIONS ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
#if defined(ABC_NAMESPACE)
namespace ABC_NAMESPACE
{
#elif defined(__cplusplus)
extern "C"
{
#endif
// procedures to start and stop the ABC framework // procedures to start and stop the ABC framework
// (should be called before and after the ABC procedures are called) // (should be called before and after the ABC procedures are called)
extern void Abc_Start(); void Abc_Start();
extern void Abc_Stop(); void Abc_Stop();
// procedures to get the ABC framework and execute commands in it // procedures to get the ABC framework and execute commands in it
extern void * Abc_FrameGetGlobalFrame(); typedef struct Abc_Frame_t_ Abc_Frame_t;
extern int Cmd_CommandExecute( void * pAbc, char * sCommand );
Abc_Frame_t * Abc_FrameGetGlobalFrame();
int Cmd_CommandExecute( Abc_Frame_t * pAbc, const char * sCommand );
#if defined(ABC_NAMESPACE)
}
using namespace ABC_NAMESPACE;
#elif defined(__cplusplus)
}
#endif
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS /// /// FUNCTION DEFINITIONS ///
...@@ -60,7 +77,7 @@ int main( int argc, char * argv[] ) ...@@ -60,7 +77,7 @@ int main( int argc, char * argv[] )
int fPrintStats = 1; int fPrintStats = 1;
int fVerify = 1; int fVerify = 1;
// variables // variables
void * pAbc; Abc_Frame_t * pAbc;
char * pFileName; char * pFileName;
char Command[1000]; char Command[1000];
clock_t clkRead, clkResyn, clkVer, clk; clock_t clkRead, clkResyn, clkVer, clk;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment