RSCRIPT := Rscript # For these convoluted variable definitions see # https://stackoverflow.com/questions/2838715/makefile-variable-initialization-and-export FOO := /home/geyer/local/current/lib/pkgconfig CFLAGS := $(shell export PKG_CONFIG_PATH=$(FOO); pkg-config --cflags libRmath) CFLAGS := $(CFLAGS) -Wall -Wextra LDFLAGS := $(shell export PKG_CONFIG_PATH=$(FOO); pkg-config --libs-only-L libRmath) LIBS := $(shell export PKG_CONFIG_PATH=$(FOO); pkg-config --libs-only-l libRmath) all: standalone.pdf standalone.html my_pgamma my_rgamma standalone.pdf : standalone.Rmd $(RSCRIPT) -e 'rmarkdown::render("standalone.Rmd", output_format = "pdf_document")' standalone.html : standalone.Rmd $(RSCRIPT) -e 'rmarkdown::render("standalone.Rmd", output_format = "html_document")' my_pgamma.o : my_pgamma.c $(CC) $(CFLAGS) -c my_pgamma.c my_pgamma : my_pgamma.o $(CC) -static $(LDFLAGS) my_pgamma.o $(LIBS) -o my_pgamma my_rgamma.o : my_rgamma.c $(CC) $(CFLAGS) -c my_rgamma.c my_rgamma : my_rgamma.o $(CC) -static $(LDFLAGS) my_rgamma.o $(LIBS) -o my_rgamma remote: all rsync -rsh=ssh --verbose --archive --update --checksum standalone.pdf standalone.html standalone.Rmd Makefile my_pgamma.c my_rgamma.c ssh.stat.umn.edu:ClassWeb/Fubar/PTT/8054/templates/src/notes/ update: ssh -A ssh.stat.umn.edu "ssh oak.stat.umn.edu '(cd ClassWeb/Fubar/PTT/8054; bin/build)'"