--- Makefile.orig 2009-04-01 17:46:11.000000000 +0400 +++ Makefile 2009-04-02 20:31:54.000000000 +0400 @@ -1,13 +1,13 @@ -PREFIX=/usr/local/ -BINDIR=$(PREFIX)bin/ -SHAREDIR=$(PREFIX)share/XorGramana/ -MAPDIR=$(SHAREDIR)maps/ +PREFIX?=/usr/local +BINDIR=$(PREFIX)/bin +SHAREDIR=$(PREFIX)/share/xorgramana/data +MAPDIR=$(SHAREDIR)/maps -SDL_CFLAGS := $(shell sdl-config --cflags) -SDL_LDFLAGS := $(shell sdl-config --libs) +SDL_CFLAGS := $(shell ${SDL_CONFIG} --cflags) +SDL_LDFLAGS := $(shell ${SDL_CONFIG} --libs) -CFLAGS := -Wall -g2 $(SDL_CFLAGS) -lGLU -lSDL_image -DDATADIR=\"$(SHAREDIR)\" +CFLAGS += -Wall -fcommon $(SDL_CFLAGS) -DDATADIR=\"$(SHAREDIR)\" # -DPLAYER_XY_DEBUG # -DMAP_DEBUG @@ -23,14 +23,14 @@ PROG := xorgramana -CC := gcc +CC ?= gcc SRC := $(wildcard *.c) OBJS := $(patsubst %.c, %.o, $(SRC)) HEADERS:= $(wildcard *.h) $(PROG): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(SDL_LDFLAGS) + $(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(SDL_LDFLAGS) -lGLU -lSDL_image %.o : %.c $(HEADERS) $(CC) $(CFLAGS) -c $<