stereoplay
annotate Makefile @ 5:ba7d221f6725
makefile modification
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 03 Nov 2011 22:01:01 +0200 |
parents | 265a24704ff2 |
children | 8fc045d33d62 |
rev | line source |
---|---|
nuclear@0 | 1 PREFIX = /usr/local |
nuclear@0 | 2 sdrdir = $(PREFIX)/share/stereoplay |
nuclear@0 | 3 sdr = $(wildcard sdr/*.glsl) |
nuclear@0 | 4 |
nuclear@0 | 5 src = $(wildcard src/*.c) |
nuclear@0 | 6 obj = $(src:.c=.o) |
nuclear@0 | 7 bin = stereoplay |
nuclear@0 | 8 |
nuclear@0 | 9 CC = gcc |
nuclear@5 | 10 CFLAGS = -pedantic -Wall -g -O2 |
nuclear@0 | 11 LDFLAGS = $(gllibs_$(shell uname -s)) -lavformat -lavcodec -lswscale |
nuclear@0 | 12 |
nuclear@0 | 13 gllibs_Linux = -lGL -lGLU -lglut -lGLEW |
nuclear@5 | 14 gllibs_Darwin = -framework OpenGL -framework GLUT -lGLEW |
nuclear@0 | 15 |
nuclear@0 | 16 $(bin): $(obj) |
nuclear@0 | 17 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 18 |
nuclear@0 | 19 .PHONY: clean |
nuclear@0 | 20 clean: |
nuclear@0 | 21 rm -f $(obj) $(bin) |
nuclear@0 | 22 |
nuclear@0 | 23 .PHONY: install |
nuclear@0 | 24 install: |
nuclear@5 | 25 mkdir -p $(PREFIX)/bin $(sdrdir) |
nuclear@5 | 26 cp $(bin) $(PREFIX)/bin/$(bin) |
nuclear@5 | 27 cp $(sdr) $(sdrdir)/ |
nuclear@0 | 28 |
nuclear@0 | 29 .PHONY: uninstall |
nuclear@0 | 30 uninstall: |
nuclear@0 | 31 rm -f $(PREFIX)/bin/$(bin) |
nuclear@5 | 32 rm -f $(sdrdir)/*.glsl |
nuclear@0 | 33 rmdir $(sdrdir) |