From ab4d06a7072d6faf62b0ec89c90197296856ec12 Mon Sep 17 00:00:00 2001 From: Allanis <allanis@saracraft.net> Date: Thu, 21 Feb 2013 23:42:47 +0000 Subject: [PATCH] [Add] OpenAL to makefile. Preparing for Audio enginey thing. --- bin/Makefile | 21 +++++++++++++++------ {gfx/fonts => dat}/font.ttf | Bin src/font.c | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) rename {gfx/fonts => dat}/font.ttf (100%) diff --git a/bin/Makefile b/bin/Makefile index 5c23df1..5e36169 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -14,8 +14,10 @@ CLUA = -I../lib/lua CSDL = $(shell sdl-config --cflags) CXML = $(shell xml2-config --cflags) CTTF = $(shell freetype-config --cflags) +CAL = -lopenal +CVORBIS = CGL = -CFLAGS = $(CLUA) $(CSDL) $(CXML) $(CTTF) $(CGL) $(VERSION) +CFLAGS = $(CLUA) $(CSDL) $(CXML) $(CTTF) $(CGL) $(CAL) $(CVORBIS) $(VERSION) ifdef DEBUG CFLAGS += -W -Wall -g3 -DDEBUG -DLUA_USE_APICHECK else @@ -23,19 +25,26 @@ CFLAGS += -O2 -funroll-loops endif LDLUA = ../lib/lua/liblua.a -LDSDL = `sdl-config --libs` -lSDL_image -LDXML = `xml2-config --libs` -LDTTF = `freetype-config --libs` +LDSDL = $(shell sdl-config --libs) -lSDL_image +LDXML = $(shell xml2-config --libs) +LDTTF = $(shell freetype-config --libs) LDGL = -lGL +LDAL = -lopenal +LDVORBIS = -lvorbisfile LDPNG = -lpng -LDFLAGS = -lm $(LDLUA) $(LDSDL) $(LDXML) $(LDTTF) $(LDGL) $(LDPNG) +LDFLAGS = -lm $(LDLUA) $(LDSDL) $(LDXML) $(LDTTF) $(LDGL) $(LDPNG) $(LDAL) $(LDVORBIS) +# This is just for gstat to run some analysis on performance. ifdef DEBUG LDFLAGS += -pg endif +DATA_AI = $(shell find ../scripts/ai/ -name '*.lua') +DATA_GFX = $(shell find ../gfx/ -name '*.png') +DATA_XML = $(shell find ../dat/ -name '*.xml' -o -name '*.ttf') +DATA_SND = $(shell find ../snd/ -name '*.ogg') DATA = data -DATAFILES = $(VERSIONFILE) $(shell find ../scripts/ ../gfx/ ../dat/ -name '*.lua' -o -name '*.png' -o -name '*.xml' -o -name '*.ttf') +DATAFILES = $(VERSIONFILE) $(DATA_AI) $(DATA_GFX) $(DATA_XML) $(DATA_SND) %.o: %.c %.h @gcc -c $(CFLAGS) -o $@ $< diff --git a/gfx/fonts/font.ttf b/dat/font.ttf similarity index 100% rename from gfx/fonts/font.ttf rename to dat/font.ttf diff --git a/src/font.c b/src/font.c index 4c3d9b1..20c5d91 100644 --- a/src/font.c +++ b/src/font.c @@ -8,7 +8,7 @@ #include "log.h" #include "pack.h" -#define FONT_DEF "../gfx/fonts/font.ttf" +#define FONT_DEF "../dat/font.ttf" // == Font render routines.================================ // Use a display list to store ASCII chars rendered with