-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (25 loc) · 666 Bytes
/
Makefile
File metadata and controls
35 lines (25 loc) · 666 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
LIBDIR = Sources/ADMM
EGFILE = example.swift
EGDIR = example
EGNAME= example
EGEXEC = $(EGDIR)/$(EGNAME)
DYLIB = libADMM.dylib
MODINFO = ADMM.swiftmodule
all: example
dir:
mkdir -p $(EGDIR)
lib: dir
rm -f $(EGDIR)/*.swift
cp $(LIBDIR)/*.swift $(EGDIR)
pushd $(EGDIR) ; swiftc -emit-library -emit-module -parse-as-library -module-name ADMM *.swift
rm -f $(EGDIR)/*.swift
example: lib
cp $(EGFILE) $(EGDIR)
pushd $(EGDIR) ; swiftc -I . -L . -lADMM -o $(EGNAME) $(EGFILE)
run: $(EGEXEC)
@export DYLD_LIBRARY_PATH=$(EGDIR):${DYLD_LIBRARY_PATH} ; $(EGEXEC)
test:
@pushd Tests ; swift test --configuration release
clean:
rm -Rf $(EGDIR)
rm -Rf .build