Checkpoint

This commit is contained in:
Pherring04 2024-10-24 15:28:34 -05:00
parent 1ae305b446
commit f6512544ff
6 changed files with 51 additions and 31 deletions

17
bin/trick-ify Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/perl
$source_dir = "" ; # Base path to build lib from. Default to working directory
$make_S_source = 0 ; # Whether to generate a S_source
$full_build = 0 ; # Whether to build only ICG/Swig artifacts or entire source
foreach $itr (0 .. $#ARGV)
{
if($ARGV[$itr] eq "-R") #Rebuild S_source
{
$make_S_source = 1 ;
}
else
{
print "Unrecognized argument: $ARGV[$itr]\n" ;
}
}

View File

@ -1,2 +1,2 @@
include trickified_project/trickified/myproject.mk
include $(CURDIR)/trickified_project/trickified/myproject.mk
TRICK_CXXFLAGS += -I$(CURDIR)/models

View File

@ -1,8 +1,8 @@
#include myproject.mk
PROJECT_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..)
TRICK_HOME := $(abspath $(PROJECT_HOME)/../../..)
include $(PROJECT_HOME)/myproject_vars.mk
export TRICKIFY_SOURCE := $(PROJECT_HOME)/include
# export TRICKIFY_BUILD_TYPE := PLO
# export TRICKIFY_OBJECT_NAME := trickified_myproject.o

View File

@ -1,32 +1,6 @@
# We know this file's position relative to the root directory of the project,
# and MAKEFILE_LIST will give us the full path to this file no matter where the
# user has installed this project.
export MYPROJECT_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..)
mkfile_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
# Specify include paths for your headers.
MYPROJECT_INCLUDE := -I$(MYPROJECT_HOME)/include
# Users may set different flags for C and C++, so you should really modify both
# to be safe.
TRICK_CFLAGS += $(MYPROJECT_INCLUDE) $(MYPROJECT_SOURCE)
TRICK_CXXFLAGS += $(MYPROJECT_INCLUDE) $(MYPROJECT_SOURCE)
export TRICKIFY_BUILD_TYPE := STATIC
export TRICKIFY_OBJECT_NAME := trickified_myproject.a
MYPROJECT_TRICK := $(MYPROJECT_HOME)/trickified/$(TRICKIFY_OBJECT_NAME)
# Tell Trick the headers and source at this location are part of a
# Trickified project
TRICK_EXT_LIB_DIRS += :$(MYPROJECT_HOME)
# Tell Trick where to find the Python modules generated by SWIG
TRICK_PYTHON_PATH += :$(MYPROJECT_HOME)/trickified/python
# Tell SWIG where to find py_*.i files
TRICK_SWIG_FLAGS += -I$(MYPROJECT_HOME)/trickified
# Link in the Trickified object
TRICK_LDFLAGS += $(MYPROJECT_TRICK)
include $(mkfile_dir)/myproject_vars.mk
# Append a prerequisite to the $(SWIG_SRC) target. This will build the
# Trickified library along with the sim if it does not already exist. Using

View File

@ -0,0 +1,29 @@
# We know this file's position relative to the root directory of the project,
# and MAKEFILE_LIST will give us the full path to this file no matter where the
# user has installed this project.
export MYPROJECT_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..)
# Specify include paths for your headers.
MYPROJECT_INCLUDE := -I$(MYPROJECT_HOME)/include
# Users may set different flags for C and C++, so you should really modify both
# to be safe.
TRICK_CFLAGS += $(MYPROJECT_INCLUDE) $(MYPROJECT_SOURCE)
TRICK_CXXFLAGS += $(MYPROJECT_INCLUDE) $(MYPROJECT_SOURCE)
export TRICKIFY_BUILD_TYPE := STATIC
export TRICKIFY_OBJECT_NAME := trickified_myproject.a
MYPROJECT_TRICK := $(MYPROJECT_HOME)/trickified/$(TRICKIFY_OBJECT_NAME)
# Tell Trick the headers and source at this location are part of a
# Trickified project
TRICK_EXT_LIB_DIRS += :$(MYPROJECT_HOME)
# Tell Trick where to find the Python modules generated by SWIG
TRICK_PYTHON_PATH += :$(MYPROJECT_HOME)/trickified/python
# Tell SWIG where to find py_*.i files
TRICK_SWIG_FLAGS += -I$(MYPROJECT_HOME)/trickified
# Link in the Trickified object
TRICK_LDFLAGS += $(MYPROJECT_TRICK)