summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2010-07-29 19:09:26 +0100
committerNick White <git@njw.me.uk>2010-07-29 19:09:26 +0100
commitca61acd4506afb0125ae64b33f5f90ee198c0f6e (patch)
tree5025ec5d4bbf8c2494f393e0699ac236fb8e58d6 /Makefile
parent3a4a0d3f39c25adb6bc8ead135ed39634b2bcfbf (diff)
Simplify things alot, and add zoom and fullscreen
Added some documentation Improved build system Consolidated code into spout.c Added fullscreen option Added zoom option Removed unneeded functions
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile58
1 files changed, 58 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d479cce
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,58 @@
+# See COPYING file for copyright, license and warranty details.
+
+NAME = spout
+SRC = spout.c
+TARGETS = $(NAME)
+
+OBJ = $(SRC:.c=.o)
+MAN = $(TARGETS:=.1)
+
+include config.mk
+
+all: $(TARGETS)
+
+$(OBJ): config.mk spout.h
+
+.c.o:
+ @echo CC $<
+ @cc -c $(CFLAGS) $<
+
+$(TARGETS): $(OBJ)
+ @echo LD $@
+ @cc -o $@ $(OBJ) $(LDFLAGS)
+
+clean:
+ rm -f -- $(TARGETS) $(OBJ) $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION).tar.gz.sig
+
+dist: clean
+ @mkdir -p $(NAME)-$(VERSION)
+ @cp -R $(SRC) $(NAME).h Makefile config.mk COPYING README $(NAME)-$(VERSION)
+ @for i in $(MAN); do \
+ sed "s/VERSION/$(VERSION)/g" < $$i > $(NAME)-$(VERSION)/$$i; done
+ @tar -c $(NAME)-$(VERSION) | gzip -c > $(NAME)-$(VERSION).tar.gz
+ @gpg -b < $(NAME)-$(VERSION).tar.gz > $(NAME)-$(VERSION).tar.gz.sig
+ @rm -rf $(NAME)-$(VERSION)
+ @echo $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION).tar.gz.sig
+
+install: all
+ @echo installing executables to $(DESTDIR)$(PREFIX)/bin
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin
+ @for i in $(TARGETS); do \
+ cp -f $$i $(DESTDIR)$(PREFIX)/bin/$$i; \
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/$$i; done
+ @echo installing manual pages to $(DESTDIR)$(MANPREFIX)/man1
+ @mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ @for i in $(MAN); do \
+ sed "s/VERSION/$(VERSION)/g" < $$i > $(DESTDIR)$(MANPREFIX)/man1/$$i; \
+ chmod 644 $(DESTDIR)$(MANPREFIX)/man1/$$i; done
+
+uninstall:
+ @echo uninstalling executables from $(DESTDIR)$(PREFIX)/bin
+ @for i in $(TARGETS); do rm -f $(DESTDIR)$(PREFIX)/bin/$$i; done
+ @echo uninstalling manual pages from $(DESTDIR)$(MANPREFIX)/man1
+ @for i in $(MAN); do rm -f $(DESTDIR)$(MANPREFIX)/man1/$$i; done
+
+test: all
+ @echo no tests yet!
+
+.PHONY: all clean dist install uninstall test