Makefiles (Tactctical Rouge)

  • Ersteller Ersteller ex-user_4198
  • Erstellt am Erstellt am
E

ex-user_4198

Guest
Hallo Leute

Ich möchte gerne "Tatical Rouge" auf FreeBSD 7.0 kompilieren.

http://www.tactical-rogue.mine.nu/index.php

Das Programm ist NICHT in der Portscollection vorhanden, darum muss man das Makefile ein bisschen ändern. Benötigt werden SDL, SDL_ttf, SDL_mixer, SDL_image, SDL_net, GL, GLU und xml2 Bibliotheken.
Beim Kompilieren des Makefiles bekom ich eine Menge Fehlermeldungen, dass eben diese Bibliotheken und Header Dateien nicht gefunden werden. Ich werd jetzt die Fehlermeldungen nicht posten, da es viel zu viel Platz einnehmen würden. Man muss natürlich das Makefile, welches wahrscheinlich für Linux angefertigt wurde, an FreeBSD anpassen.

Das Makefile sieht folgendermasen aus:


all:test

CC = gcc

# For debug mode
CFLAGS = -g -Wall -D_GLIBCXX_DEBUG

# libraries
LIBS = -lSDL -lSDL_image -lSDL_ttf -lSDL_net -lSDL_mixer -lGL -lGLU -lxml2

# include dirs
INCLUDE_LIBXML2 = /usr/include/libxml2

# our libraries
GAME_TARGETS = video.o audio.o input.o character.o map.o terrain.o interface.o log.o stat.o item.o xml.o test.o modifier.o game.o matrix.o
EDITOR_TARGETS = video.o audio.o input.o character.o map.o terrain.o interface.o log.o stat.o item.o xml.o editor.o modifier.o

.cpp.o:
$(CC) $(CFLAGS) -I$(INCLUDE_LIBXML2) -c $<

test: $(GAME_TARGETS)
$(CC) $(CFLAGS) $(LIBS) -o rogue $(GAME_TARGETS)

test.o: main.h test.cpp

video.o: video.h video.cpp

audio.o: audio.cpp audio.h

input.o: input.cpp input.h

character.o: character.h character.cpp

map.o: map.h map.cpp

matrix.o: matrix.h matrix.cpp

game.o: game.h game.cpp

terrain.o: terrain.h terrain.cpp

interface.o: interface.h interface.cpp

log.o: log.h log.cpp

stat.o: stat.h stat.cpp

item.o: item.h item.cpp

xml.o: xml.h xml.cpp

editor: $(EDITOR_TARGETS)
$(CC) $(CFLAGS) $(LIBS) -o editor $(EDITOR_TARGETS)

editor.o: main.h editor.cpp

video.o: video.h video.cpp

audio.o: audio.cpp audio.h

input.o: input.cpp input.h

character.o: character.h character.cpp

map.o: map.h map.cpp

terrain.o: terrain.h terrain.cpp

interface.o: interface.h interface.cpp

log.o: log.h log.cpp

stat.o: stat.h stat.cpp

item.o: item.h item.cpp

xml.o: xml.h xml.cpp

modifier.o: modifier.h modifier.cpp

clean:
rm *.o rogue
 
Dann solltest Du die includes dementsprechend anpassen. Die sind unter FBSD momentan wie folgt verteilt:

SDL->/usr/local/include/SDL
XML2->/usr/local/include/libxml2
GL/GLU->/usr/local/include/GL

allgemein /usr/local/include noch als Pfad angeben. Wenn dann noch was schiefgeht, siehst Du ja aufgelistet, welche Includes noch fehlen. Dementsprechend musst Du evtl. den Source ändern oder Links setzen, etc. Wo die includes von einem speziellen Paket hin sind findest Du in etwa raus mit:
Code:
cat /var/db/pkg/<package>/+CONTENTS | grep include

Hoffe das hilft n bissl :)
 
Zurück
Oben