includepfad dynamisch ? aber wie ?

JoelH

JoelH

I love Ruby
Hier mein Makefile
# Project: Buddysimulator
# Makefile created by Dev-C++ 4.9.6.0

CC = g++.exe
WINDRES = windres.exe
RES =
OBJ = buddysimulator.o manager.o $(RES)
LIBS = -L"e:/Dev-Cpp/lib"
INCS = -I"e:/Dev-Cpp/include" -I"E:/Dev-Cpp/jonas" -I"e:/Dev-Cpp/include/g++-3" -I"e:/Dev-Cpp/include" -I"E:/Dev-Cpp/jonas" -I"E:/Dev-Cpp/jonas"
BIN = buddysimulator.exe
CFLAGS = $(INCS) -pg -g3

.PHONY: all all-before all-after clean clean-custom

all: all-before buddysimulator.exe all-after


clean: clean-custom
rm -f $(OBJ) $(BIN)

$(BIN): $(OBJ)
$(CC) $(OBJ) -o "buddysimulator.exe" $(LIBS) $(CFLAGS)

buddysimulator.o: buddysimulator.cpp
$(CC) -c buddysimulator.cpp -o buddysimulator.o $(CFLAGS)

manager.o: manager.cpp
$(CC) -c manager.cpp -o manager.o $(CFLAGS)
Leider sind ja jetzt die Includepfade statisch, sprich wenn ich den Kram irgendwo anders auspacke wir er meinen Header nicht finden, wie kann ich es so machen dass der Pfad dorthin geht wo das gepackte File entzippt wird ?
 
Hallo JoelH,

Indem Du relative Pfadangaben verwendest.
Schreibe also nicht der Absolute Pfad hin sondern nur ab der Stelle wo sich deine Makefile befindet.

Dann ist es egal in welches Verzeichnis das ganze entpackt wird.

Beispiel: INCS = -I"Dev-Cpp/include"

FMM
 
hmm,

hehe joo, daran hatte ich noch garnicht gedacht , einfach ./ ruled wohl :) Ich war einfach zu verwirrt :(
 

Ähnliche Themen

X startet nichtmehr

Problem mit HSPA+ Modem Huawei E353 - Installation unmöglich?

dovecot und postfix Konfiguration Problem

Festplatte stirbt, dd funktioniert nicht

Displayport + externer Monitor zeigt bei startx nichts erst bei DVI

Zurück
Oben