Include SDL headers properly.

Using <SDL/SDL.h>, or in this case <SDL2/SDL.h>, and others like this
is not the proper way to include SDL headers. The proper way is to
pass the -lSDL2 flag to the compiler. The place I put it might be
awkward, but I'm planning to replace this hand-written makefile with
Autoconf/Automake scripts, anyway.
This commit is contained in:
onpon4 2015-03-01 14:26:14 -05:00
parent 23d95f99b6
commit 288d96a39b
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
CXXFLAGS ?= -O2 -Wall -g
CXXFLAGS += `pkg-config --cflags sdl2 SDL2_image SDL2_mixer` -DLINUX
CXXFLAGS += `pkg-config --cflags sdl2 SDL2_image SDL2_mixer` -DLINUX -lSDL2
LIBS = `pkg-config --libs sdl2 SDL2_image SDL2_mixer`
OBJS = ai.o aliens.o audio.o bullets.o cargo.o collectable.o comms.o debris.o events.o explosions.o game.o globals.o graphics.o init.o intermission.o loadSave.o messages.o misc.o missions.o player.o resources.o script.o shop.o Starfighter.o title.o weapons.o

View File

@ -26,9 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <sys/stat.h>
#include <unistd.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_mixer.h>
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_mixer.h"
#include "defs.h"
#include "structs.h"