nuclear@5: name = $(shell pwd | sed 's/.*\///') nuclear@5: bin = $(name) nuclear@5: src = $(wildcard *.c) nuclear@5: obj = $(src:.c=.o) nuclear@5: nuclear@5: sgldir = ../.. nuclear@5: nuclear@5: CC = gcc nuclear@5: CFLAGS = -pedantic -Wall -g -I$(sgldir)/include nuclear@5: LDFLAGS = -L. -Wl,-rpath=. -lsgl -lGL -lGLU -lm nuclear@5: nuclear@5: $(bin): $(obj) libsgl.so nuclear@5: $(CC) -o $@ $(obj) $(LDFLAGS) nuclear@5: nuclear@5: libsgl.so: $(sgldir)/libsgl.so.0.0 nuclear@5: ln -s $< $@.0 nuclear@5: ln -s $< $@ nuclear@5: nuclear@5: .PHONY: clean nuclear@5: clean: nuclear@5: rm -f $(obj) $(bin)