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:
parent
23d95f99b6
commit
288d96a39b
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
||||||
CXXFLAGS ?= -O2 -Wall -g
|
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`
|
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
|
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
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include "SDL.h"
|
||||||
#include <SDL2/SDL_image.h>
|
#include "SDL_image.h"
|
||||||
#include <SDL2/SDL_mixer.h>
|
#include "SDL_mixer.h"
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "structs.h"
|
#include "structs.h"
|
||||||
|
|
Loading…
Reference in New Issue