From a1b4c92da5f1b9de5e9c289c0fd37ba060bf5377 Mon Sep 17 00:00:00 2001 From: Kamil Kaminski Date: Wed, 27 Jul 2011 11:47:44 -0500 Subject: initial commit, ported from sdl repo --- Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3b3f939 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +PROG = vbo +OBJS = $(PROG).o +CC = gcc +DBGFLAGS = -g -O0 +ifdef DEBUG + CFLAGS = $(DBGFLAGS) -Wall -std=c99 +else + CFLAGS = -Wall -std=c99 -O2 -march=native -mtune=native +endif +LDFLAGS = -lGLEW -lGL -lGLU -lm -lglut +SDL_CFLAGS := $(shell sdl-config --cflags) +SDL_LDFLAGS := $(shell sdl-config --libs) +SDL_image_CFLAGS := $(shell pkg-config --cflags SDL_image) +SDL_image_LDFLAGS := $(shell pkg-config --libs SDL_image) + +$(PROG): $(OBJS) + $(CC) $(LDFLAGS) $(SDL_LDFLAGS) $(SDL_image_LDFLAGS) $(OBJS) -o $(PROG) + +$(PROG).o: $(PROG).c + $(CC) -c $(CFLAGS) $(SDL_CFLAGS) $(SDL_image_CFLAGS) $(PROG).c + +.PHONY: clean + +clean: + rm -f *.o ./$(PROG) -- cgit v1.2.3