blob: 95d7e82c59eefef8d9a39ec8c747a1676b13ba33 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
DEBUG = -O0 -ggdb -g3
DEBUG = -O3
CFLAGS = -Wall -pedantic -std=gnu99 $(DEBUG)
LDFLAGS = -lGL -lGLU -lglut
BINARY = ray
VERSION = 0.1
PREFIX = /usr/local
OBJECTS = $(BINARY).o
all: $(BINARY)
$(BINARY): $(BINARY).c 3dmath.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $(BINARY) 3dmath.c $(BINARY).c
clean:
rm -f $(BINARY).o $(BINARY)
install: all
mkdir -p $(PREFIX)/bin
cp -f $(BINARY) $(PREFIX)/bin/$(BINARY)
chmod 755 $(PREFIX)/bin/$(BINARY)
mkdir -p $(PREFIX)/man/man1
sed "s/VERSION/$(VERSION)/g" < $(BINARY).1 > $(PREFIX)/man/man1/$(BINARY).1
chmod 644 $(PREFIX)/man/man1/$(BINARY).1
uninstall:
rm -f $(BINARY) $(PREFIX)/bin/$(BINARY)
|