oa: make it build (against stub)
This commit is contained in:
parent
d9e76f372b
commit
9ae91bb4c9
13
oa/Makefile
13
oa/Makefile
|
|
@ -11,9 +11,12 @@ include ${MAGICDIR}/defs.mak
|
|||
|
||||
#----------------------------------------
|
||||
|
||||
ifeq ($(OA),)
|
||||
OA := fake_oa_stub
|
||||
endif
|
||||
CXX_INCLUDES = -I. -I${OA}/oa/include
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
DEPS_MAGIC := $(shell mkdir -p .deps > /dev/null 2>&1 || :)
|
||||
|
||||
DEP_FILES = $(addprefix .deps/,$(SRCS:.c=.P))\
|
||||
$(addprefix .deps/,$(CXXSRCS:.cpp=.P))
|
||||
|
|
@ -21,7 +24,7 @@ DEP_FILES = $(addprefix .deps/,$(SRCS:.c=.P))\
|
|||
-include ${DEP_FILES}
|
||||
|
||||
%.o: %.cpp
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
@echo '$(CXX) -c $<'; \
|
||||
${CXX} ${CXX_CFLAGS} ${OTHER_CFLAGS} ${CXX_INCLUDES} -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
|
|
@ -29,8 +32,12 @@ DEP_FILES = $(addprefix .deps/,$(SRCS:.c=.P))\
|
|||
>> .deps/$(*F).P; \
|
||||
${RM} .deps/$(*F).pp
|
||||
|
||||
clean:
|
||||
oa-main: lib
|
||||
|
||||
module-clean:
|
||||
${RM} ${CLEANS}
|
||||
${RM} *.o
|
||||
${RM} *.a
|
||||
${RM} -r .deps
|
||||
|
||||
#------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include <iostream>
|
||||
#include <cstring>
|
||||
#include <oaDB.h>
|
||||
#include <magicOA.h>
|
||||
#include <magicInit.h>
|
||||
|
|
@ -147,7 +148,7 @@ TCLFUNC(get_db_units_per_user_unit) {
|
|||
|
||||
TCLFUNC(open_cell) {
|
||||
TCLENTRY();
|
||||
int cvIndex;
|
||||
//int cvIndex;
|
||||
|
||||
if(objc != 4)
|
||||
TCL_RTN_ERROR("Usage: %s lib cell view",getArgString(0));
|
||||
|
|
@ -163,7 +164,7 @@ TCLFUNC(open_cell) {
|
|||
|
||||
TCLFUNC(close_cell) {
|
||||
TCLENTRY();
|
||||
int cellIndex;
|
||||
//int cellIndex;
|
||||
|
||||
if((objc != 4))
|
||||
TCL_RTN_ERROR("Usage: %s lib cell view", getArgString(0));
|
||||
|
|
@ -199,8 +200,8 @@ TCLFUNC(close_all_cells) {
|
|||
}
|
||||
|
||||
TCLFUNC(get_bounding_box) {
|
||||
char *defstring;
|
||||
char *inststring;
|
||||
const char *defstring;
|
||||
const char *inststring;
|
||||
int callback = 0;
|
||||
|
||||
TCLENTRY();
|
||||
|
|
@ -240,8 +241,8 @@ TCLFUNC(help) {
|
|||
|
||||
struct tclCmd {
|
||||
Tcl_ObjCmdProc * cmd;
|
||||
char *name;
|
||||
char *help;
|
||||
const char *name;
|
||||
const char *help;
|
||||
};
|
||||
|
||||
static const struct tclCmd tclCmds[] = {
|
||||
|
|
@ -300,8 +301,10 @@ int Magicoa_Init(Tcl_Interp *interp) {
|
|||
return TCL_ERROR;
|
||||
#endif
|
||||
try {
|
||||
char argvbuf[32];
|
||||
int args=1;
|
||||
char *argv[] = {"tclsh"};
|
||||
snprintf(argvbuf, sizeof(argvbuf), "tclsh");
|
||||
char *argv[] = {&argvbuf[0]};
|
||||
oaDBInit(&args, argv);
|
||||
|
||||
} CATCH
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include <iostream>
|
||||
#include <cstring>
|
||||
#include <magicOA.h>
|
||||
|
||||
using namespace std;
|
||||
|
|
@ -10,8 +11,9 @@ oaCellView *curCellView;
|
|||
int
|
||||
getTechInfo (const char *techName)
|
||||
{
|
||||
|
||||
char *argArray[] = {"tclsh"};
|
||||
char argvbuf[32];
|
||||
snprintf(argvbuf, sizeof(argvbuf), "tclsh");
|
||||
char *argArray[] = {&argvbuf[0]};
|
||||
int argCount = 1;
|
||||
// initialize OA DB
|
||||
oaDBInit( &argCount, argArray );
|
||||
|
|
@ -37,7 +39,7 @@ getTechInfo (const char *techName)
|
|||
oaString routeLayerName;
|
||||
|
||||
cout <<"Route layer specs" << endl;
|
||||
for (int i = 0; i < routeLayerSpecArray.getNumValues(); i++) {
|
||||
for (unsigned int i = 0; i < routeLayerSpecArray.getNumValues(); i++) {
|
||||
oaRouteLayerSpec routeLayerSpec = routeLayerSpecArray[i];
|
||||
oaPhysicalLayer *routeLayer = routeLayerSpec.layer();
|
||||
routeLayer->getName(routeLayerName);
|
||||
|
|
@ -177,7 +179,7 @@ openDesign(const char *lib, const char *cell, const char *view) {
|
|||
try {
|
||||
cellView = oaCellView::open(libName, cellName, viewName,
|
||||
oacMaskLayout, 'r');
|
||||
} catch (oaDBException dbErr) {
|
||||
} catch (oaDBException& dbErr) {
|
||||
cout << dbErr.getFormatString() << endl;
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -307,13 +309,13 @@ getBoundingBox (oaInst *instPtr, const char *instanceName, const char *defName,
|
|||
inst->getOrigin(instOrigin);
|
||||
try {
|
||||
cellView = inst->getMaster();
|
||||
} catch (oaDBException dbErr) {
|
||||
} catch (oaDBException& dbErr) {
|
||||
cout << "error in getMaster" << endl;
|
||||
return 1;
|
||||
}
|
||||
try {
|
||||
topBlock = cellView->getTopBlock();
|
||||
} catch (oaDBException dbErr) {
|
||||
} catch (oaDBException& dbErr) {
|
||||
cout << "error in getTopBlock" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue