diff options
author | 2012-08-15 00:24:32 +0200 | |
---|---|---|
committer | 2012-08-15 00:24:32 +0200 | |
commit | 5769114042ec60274d48cb3794c00348ca22da66 (patch) | |
tree | 5c374cb13831cb04104d597a1b2c2461d11c0ed7 /undone/Makefile | |
parent | 50dc2da0b1710e6f93ffbbfca0db7e9f937a3d8a (diff) | |
download | undone-5769114042ec60274d48cb3794c00348ca22da66.tar.gz undone-5769114042ec60274d48cb3794c00348ca22da66.zip |
Add Makefiles and others
Diffstat (limited to 'undone/Makefile')
-rw-r--r-- | undone/Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/undone/Makefile b/undone/Makefile new file mode 100644 index 0000000..fe92bd7 --- /dev/null +++ b/undone/Makefile @@ -0,0 +1,30 @@ +DESTDIR ?= /usr/local +SITEDIR = $(shell pkg-config guile-2.0 --variable=sitedir \ + --define-variable=prefix=$(DESTDIR)) +COMPDIR = $(DESTDIR)/lib/guile/2.0/site-ccache + +objects = main.scm main.go +install-objects = $(addprefix install-,$(objects)) +uninstall-objects = $(addprefix uninstall-,$(objects)) + +.PHONY: all install $(install-objects) uninstall $(uninstall-objects) + +all: $(filter %.go,$(objects)) + +$(filter %.go,$(objects)): %.go: %.scm + ../env guild compile -o $@ $^ + +install: $(install-objects) +uninstall: $(uninstall-objects) + +$(filter %.go,$(install-objects)): install-%: $(filter %.go,$(objects)) + install -Dm 644 $* "$(COMPDIR)/undone/$*" + +$(filter %.scm,$(install-objects)): install-%: + install -Dm 644 $* "$(SITEDIR)/undone/$*" + +$(filter %.go,$(uninstall-objects)): uninstall-%: + rm -f "$(COMPDIR)/undone/$*" + +$(filter %.scm,$(uninstall-objects)): uninstall-%: + rm -f "$(SITEDIR)/undone/$*" |