Skip to content

Commit

Permalink
Makefile to build libUpsurge.a and .swiftmodule
Browse files Browse the repository at this point in the history
  • Loading branch information
timburgess authored and Alejandro Isaza committed Dec 3, 2015
1 parent 38dfbcf commit eb568e9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Source/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
VPATH = Array Complex DSP Matrix Operations Tensor Types
SDK=$$(xcrun --show-sdk-path --sdk macosx)
SRC=ValueArray.swift ValueArraySlice.swift DSP.swift Matrix.swift MatrixArithmetic.swift Tensor.swift TensorSlice.swift Span.swift Arithmetic.swift Auxiliary.swift Exponential.swift Hyperbolic.swift Trigonometric.swift ContiguousMemory.swift Interval.swift Real.swift Value.swift
OBJS:=$(subst .swift,.o,$(SRC))

.PHONY: all
all: libUpsurge.a Upsurge.swiftmodule

libUpsurge.a: $(OBJS)
libtool -static -s -o $@ -no_warning_for_no_symbols $^

Upsurge.swiftmodule: $(SRC)
xcrun swiftc -emit-module $^ -sdk $(SDK) -module-name Upsurge

$(OBJS): $(SRC)
xcrun swiftc -emit-library -emit-object $^ -sdk $(SDK) -module-name Upsurge

.PHONY: clean
clean:
rm -f *.o *.a *.swiftdoc *.swiftmodule

0 comments on commit eb568e9

Please sign in to comment.