Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The swift-tcl build is now created from 4 repositories. This makes it possible to build Tcl extensions and programs using the Swift Package Manager. make -C swift-tcl8.6 install make -C swift-tcl install make -C swift-tcl-demo test make -C swift-tcl-extension-demo test
- Loading branch information
Shannon Noe
committed
Jul 31, 2017
1 parent
58a2834
commit c3773c2
Showing
15 changed files
with
41 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
SwiftTcl.xcodeproj | ||
.build | ||
.build/* | ||
Package.pins | ||
SwiftTcl.xcodeproj/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,41 @@ | ||
# | ||
# tcl library path for brew - needs to be parameterized somehow | ||
# | ||
# version for TCL brew package | ||
TCLVERSION=8.6.6_2 | ||
BREWROOT=/usr/local/Cellar | ||
TCLLIBPATH=$(BREWROOT)/tcl-tk/$(TCLVERSION)/lib | ||
TCLINCPATH=$(BREWROOT)/tcl-tk/$(TCLVERSION)/include | ||
UNAME_S := $(shell uname -s) | ||
|
||
BUILD=./.build | ||
ifeq ($(UNAME_S),Linux) | ||
EXTRA_SWIFTLINK= | ||
TARGET = .build/debug/libSwiftTcl.so | ||
endif | ||
|
||
default: SwiftTcl.xcodeproj | ||
ifeq ($(UNAME_S),Darwin) | ||
TCLVERSION=8.6.6_2 | ||
BREWROOT=/usr/local/Cellar | ||
TCLLIBPATH=$(BREWROOT)/tcl-tk/$(TCLVERSION)/lib | ||
TCLINCPATH=$(BREWROOT)/tcl-tk/$(TCLVERSION)/include | ||
EXTRA_SWIFTLINK=-Xlinker -L/usr/local/lib \ | ||
-Xlinker -L$(TCLLIBPATH) \ | ||
-Xcc -I$(TCLINCPATH) | ||
TARGET = .build/debug/libSwiftTcl.dylib | ||
endif | ||
|
||
build: $(BUILD) | ||
default: $(TARGET) | ||
|
||
$(BUILD): Package.swift Makefile | ||
swift build -Xlinker -L$(TCLLIBPATH) -Xlinker -ltcl8.6 -Xlinker -ltclstub8.6 -Xlinker -lz -Xcc -I$(TCLINCPATH) | ||
$(TARGET): Package.swift Makefile | ||
swift build $(EXTRA_SWIFTLINK) | ||
|
||
SwiftTcl.xcodeproj: Package.swift Makefile build | ||
swift package -Xlinker -L$(TCLLIBPATH) -Xlinker -ltcl8.6 -Xlinker -ltclstub8.6 generate-xcodeproj | ||
swift package $(EXTRA_SWIFTLINK) generate-xcodeproj | ||
@echo "NOTE: You will need to manually set the working directory for the SwiftTclDemo scheme to the root directory of this tree." | ||
@echo "Thanks Apple" | ||
|
||
ifeq ($(UNAME_S),Linux) | ||
install: $(TARGET) | ||
cp $(TARGET) /usr/lib/x86_64-linux-gnu | ||
ldconfig /usr/lib/x86_64-linux-gnu/libSwiftTcl.so | ||
endif | ||
|
||
ifeq ($(UNAME_S),Darwin) | ||
install: $(TARGET) | ||
cp $(TARGET) /usr/local/lib | ||
endif | ||
|
||
clean: | ||
rm -rf $(TARGET) .build Package.pins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.