Skip to content

Commit

Permalink
Issue cocotb#50: Some cleanups and path fixes for installation
Browse files Browse the repository at this point in the history
  • Loading branch information
stuarthodgson committed Jul 18, 2013
1 parent 390efea commit d3238eb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ pycode:
src_install:
@mkdir -p $(FULL_INSTALL_DIR)/lib
@mkdir -p $(FULL_INSTALL_DIR)/bin
@mkdir -p $(FULL_INSTALL_DIR)/include
@cp -R lib/* $(FULL_INSTALL_DIR)/lib/
@cp -R include/* $(FULL_INSTALL_DIR)/include/

common_install:
@cp -R bin/cocotbenv.py $(FULL_INSTALL_DIR)/bin/
@cp -R bin/create_project.py $(FULL_INSTALL_DIR)/bin/
@cp -R makefiles $(FULL_INSTALL_DIR)/
@rm -rf $(FULL_INSTALL_DIR)/makefiles/Makefile.inc

create_files:
bin/create_files.py $(FULL_INSTALL_DIR)
Expand Down
3 changes: 1 addition & 2 deletions bin/create_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ def print_uninstall(path):
uninstall.write(file_contents)

def print_files(path):
print_make_inc(path)
print_uninstall(path)

call("install -m 544 /tmp/cocotb_uninstall " + path + "/bin/cocotb_uninstall", shell=True)
call("install -m 666 /tmp/Makefile.inc " + path + "/makefiles/Makefile.inc", shell=True)
call("rm -rf /tmp/cocotb_uninstall", shell=True)

def check_args(args):
if len(args) is not 1:
Expand Down
6 changes: 3 additions & 3 deletions lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@

include $(SIM_ROOT)/makefiles/Makefile.inc

CLIBS:= $(SIM_ROOT)/lib/simulator \
CLIBS:= $(SIM_ROOT)/lib/gpi \
$(SIM_ROOT)/lib/embed \
$(SIM_ROOT)/lib/vpi_shim \
$(SIM_ROOT)/lib/gpi
$(SIM_ROOT)/lib/simulator

libs_native: $(CLIBS)

force_32:
ARCH=i686 make

$(SIM_ROOT)/lib/vpi_shim: $(SIM_ROOT)/lib/embed $(SIM_ROOT)/lib/gpi
$(SIM_ROOT)/lib/vpi_shim: $(SIM_ROOT)/lib/gpi $(SIM_ROOT)/lib/embed
$(SIM_ROOT)/lib/simulator: $(SIM_ROOT)/lib/vpi_shim

$(LIB_OBJ_DIR):
Expand Down
6 changes: 3 additions & 3 deletions makefiles/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export SIM_ROOT:=$(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..)
endif

ifeq ($(USER_DIR),)
export USER_DIR:=/tmp/cocotb
export USER_DIR:=$(SIM_ROOT)
endif

BUILD_DIR=$(USER_DIR)/build
Expand All @@ -48,9 +48,11 @@ include $(SIM_ROOT)/makefiles/Makefile.paths
include $(SIM_ROOT)/makefiles/Makefile.pylib

export LIB_DIR=$(BUILD_DIR)/libs/$(ARCH)
export LIB_OBJ_DIR:= $(BUILD_DIR)/obj/$(ARCH)
export INCLUDES := -I$(SIM_ROOT)/include $(PYTHON_INCLUDEDIR)



# Base GCC flags
ifeq ($(OS),Darwin)
GCC_ARGS := -g -DDEBUG -fpic
Expand All @@ -69,5 +71,3 @@ LINKER_ARGS := -shared -undefined suppress -flat_namespace -L$(PYTHON_LIBDIR)
else
LINKER_ARGS := -shared -Xlinker -export-dynamic
endif

LIB_OBJ_DIR:= $(BUILD_DIR)/obj/$(ARCH)
2 changes: 1 addition & 1 deletion makefiles/simulators/Makefile.vcs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ endif

all: $(SIM_OBJ_DIR) sim

$(SIM_OBJ_DIR):
$(OBJ_DIR):
mkdir -p $(OBJ_DIR)


Expand Down

0 comments on commit d3238eb

Please sign in to comment.