Browse Source

Make project compilable

DricomDragon 4 năm trước cách đây
mục cha
commit
e9fc5b3db0
3 tập tin đã thay đổi với 27 bổ sung1 xóa
  1. 1 0
      sdl1/gfxSimple/.gitignore
  2. 1 1
      sdl1/gfxSimple/main.cpp
  3. 25 0
      sdl1/gfxSimple/makefile

+ 1 - 0
sdl1/gfxSimple/.gitignore

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

+ 1 - 1
sdl1/gfxSimple/main.cpp

@@ -3,7 +3,7 @@
 #include <cmath>
 
 //SDL
-#include <SDL.h>
+#include <SDL/SDL.h>
 #undef main
 //#include <SDL/SDL_rotozoom.h>
 

+ 25 - 0
sdl1/gfxSimple/makefile

@@ -0,0 +1,25 @@
+CXX=g++
+CXXFLAGS=
+LDFLAGS=-lSDL
+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)