11# This Makefile template requires the following variables to be set
22# in the environment or on the command-line:
33# JULIA: path to julia[.exe] executable
4- # BIN: binary build directory
54
65ifndef JULIA
7- $(error "Please pass JULIA=[path of target julia binary], or set as environment variable!")
8- endif
9- ifndef BIN
10- $(error "Please pass BIN=[path of build directory], or set as environment variable!")
6+ $(error "Please pass JULIA=[path of Julia binary], or set as environment variable!")
117endif
128
139# =============================================================================
1410# location of test source
1511SRCDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST ) ) ) )
1612PKGDIR := $(dir $(SRCDIR ) )
17- JULIAHOME := $(abspath $(JULIA ) /../.. )
18- BUILDSCRIPT := $(BIN ) /../ share/julia/juliac-buildscript .jl
13+ JULIAHOME := $(abspath $(subst bin,, $( dir $( JULIA )) ) )
14+ BUILDSCRIPT := $(JULIAHOME ) / share/julia/juliac.jl
1915# include $(JULIAHOME)/Make.inc
2016
2117# FIXME
@@ -34,14 +30,14 @@ LDFLAGS_ADD = -lm $(shell $(JULIA_CONFIG) --ldflags --ldlibs) -ljulia-internal
3430
3531release : NMFMerge-jl.$(SHLIB_EXT )
3632
37- NMFMerge-jl.$(SHLIB_EXT ) : $(PKGDIR ) /src/NMFMerge.jl $(BUILDSCRIPT )
38- $(JULIA ) -t 1 -J $(BIN ) /../lib/julia/sys.$(SHLIB_EXT ) --project --startup-file=no --history-file=no --output-incremental=no --strip-ir --strip-metadata --experimental --trim $(BUILDSCRIPT ) $( SRCDIR ) /lib.jl --output-lib NMFMerge-jl.so
33+ NMFMerge-jl.$(SHLIB_EXT ) : $(PKGDIR ) /src/NMFMerge.jl $(SRCDIR ) /lib.jl $( BUILDSCRIPT )
34+ $(JULIA ) -t 1 -J $(dir $( JULIA ) ) /../lib/julia/sys.$(SHLIB_EXT ) --project --startup-file=no --history-file=no --output-incremental=no --strip-ir --strip-metadata $( BUILDSCRIPT ) --experimental --trim $(SRCDIR ) /lib.jl --output-lib $( SRCDIR ) / NMFMerge-jl.$( SHLIB_EXT )
3935
4036check : hello$(EXE ) basic_jll$(EXE ) # FIXME
4137 $(JULIA ) --depwarn=error $(SRCDIR ) /../runtests.jl $(SRCDIR ) /trimming
4238
43- clean : # FIXME
44- -rm -f hello $( EXE ) basic_jll $( EXE ) init.o hello.o basic_jll.o
39+ clean :
40+ -rm -f $( SRCDIR ) /NMFMerge-jl. $( SHLIB_EXT )
4541
4642.PHONY : release clean check
4743
0 commit comments