configure make
This commit is contained in:
17
Makefile
Normal file
17
Makefile
Normal file
@ -0,0 +1,17 @@
|
||||
prefix ?= /usr/local
|
||||
bindir = $(prefix)/bin
|
||||
libdir = $(prefix)/lib
|
||||
|
||||
build:
|
||||
swift build -c release --disable-sandbox
|
||||
|
||||
install: build
|
||||
install ".build/release/stringen" "$(bindir)"
|
||||
|
||||
uninstall:
|
||||
rm -rf "$(bindir)/stringen"
|
||||
|
||||
clean:
|
||||
rm -rf .build
|
||||
|
||||
.PHONY: build install uninstall clean
|
||||
31
Package.swift
Normal file
31
Package.swift
Normal file
@ -0,0 +1,31 @@
|
||||
// swift-tools-version:5.0
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "StringGenerator",
|
||||
platforms: [
|
||||
.macOS(.v10_13),
|
||||
],
|
||||
products: [
|
||||
// Products define the executables and libraries produced by a package, and make them visible to other packages.
|
||||
.library(
|
||||
name: "StringGenerator",
|
||||
targets: ["StringGenerator"]),
|
||||
.executable(
|
||||
name: "stringen",
|
||||
targets: ["StringGenerator"]),
|
||||
],
|
||||
dependencies: [
|
||||
// Dependencies declare other packages that this package depends on.
|
||||
// .package(url: /* package url */, from: "1.0.0"),
|
||||
],
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
|
||||
.target(
|
||||
name: "StringGenerator",
|
||||
path: "StringGenerator"),
|
||||
]
|
||||
)
|
||||
Reference in New Issue
Block a user