Quellcode durchsuchen

Make the project compilable

DricomDragon vor 4 Jahren
Ursprung
Commit
6d3c2c7c97

+ 1 - 0
sdl1/textSimple/.gitignore

@@ -0,0 +1 @@
+bin/

BIN
sdl1/textSimple/Polices/droid.ttf


+ 2 - 2
sdl1/textSimple/main.cpp

@@ -1,9 +1,9 @@
 #include <cstdlib>
 #include <iostream>
 #include <string>
-#include <SDL.h>
+#include <SDL/SDL.h>
 
-#include <SDL_ttf.h>
+#include <SDL/SDL_ttf.h>
 
 int main ( int argc, char** argv )
 {

+ 25 - 0
sdl1/textSimple/makefile

@@ -0,0 +1,25 @@
+CXX=g++
+CXXFLAGS=
+LDFLAGS=-lSDL -lSDL_ttf
+INC=
+LIB=
+
+EXEC=SdlApp
+SRC=$(shell find . -name '*.cpp')
+OBJ=$(SRC:.cpp=.o)
+
+$(EXEC): $(OBJ)
+	@mkdir -p bin
+	$(CXX) -o bin/$@ $^ $(LDFLAGS) $(LIB)
+
+%.o : %.cpp
+	$(CXX) -o $@ -c $< $(CXXFLAGS) $(INC)
+
+clean:
+	rm -rf $(OBJ)
+
+distclean: clean
+	rm -rf ./bin
+
+exec: $(EXEC)
+	./bin/$(EXEC)