From a1b760ec22d8c313ce2f5fbe29c48f095a5feee0 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Tue, 28 Sep 2010 12:49:00 -0500 Subject: Initial commit --- sdl/Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sdl/Makefile (limited to 'sdl/Makefile') diff --git a/sdl/Makefile b/sdl/Makefile new file mode 100644 index 0000000..9e76257 --- /dev/null +++ b/sdl/Makefile @@ -0,0 +1,26 @@ +PROG = pyramid +OBJS = $(PROG).o math3d.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 math3d.h + $(CC) -c $(CFLAGS) $(SDL_CFLAGS) $(SDL_image_CFLAGS) $(PROG).c + +math3d.o: math3d.c math3d.h + $(CC) -c $(CFLAGS) math3d.c + +clean: + rm -f *.o ./$(PROG) -- cgit v1.2.3