configure make

This commit is contained in:
Mihail Preis
2019-07-12 19:44:51 +05:00
parent 8992c709ea
commit d02a9b8ee5
2 changed files with 48 additions and 0 deletions

17
Makefile Normal file
View 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
View 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"),
]
)