This commit is contained in:
Tamir Atias 2012-04-08 00:43:55 +03:00
commit 242af52bb8
3 changed files with 31 additions and 4 deletions

View File

@ -9,16 +9,23 @@ default: all
all:
$(MAKE) -C ../src/Main
$(MAKE) -C ../src/Texture
$(MAKE) -C ../src/Actor
$(CC) $(CFLAGS) -o LibD ../src/Main/main.cpp ../src/Main/*.o $(LDADD)
$(CC) $(CFLAGS) -o LibD ../src/Main/main.cpp ../src/Main/*.o ../src/Texture/*.o \
../src/Actor/*.o $(LDADD)
static:
@echo -e "\033[1;31mThis is an experimental build, if it does not work, don't complain...\033[0m"
@sleep 1
$(MAKE) -C ../src/Main/
$(MAKE) -C ../src/Main/ ../src/Main/*.o ../src/Texture/*.o \
../src/Actor/*.o
$(CC) $(CFLAGS) -o build/LibD-static ../src/Main/main.cpp ../src/Main/*.o $(LDADDSTATIC)
$(CC) $(CFLAGS) -o build/LibD-static ../src/Main/main.cpp ../src/Main/*.o \
../src/Texture/*.o ../src/Actor/*.o $(LDADDSTATIC)
clean:
$(MAKE) -C ../src/Main/ clean
$(MAKE) -C ../src/Texture/ clean
$(MAKE) -C ../src/Actor/ clean
rm -f LibD

20
src/Actor/Makefile Normal file
View File

@ -0,0 +1,20 @@
CC = g++
CFLAGS = -ansi -Wall -g
LDADD = -lGL -lGLU -lSDL -lSDL_image
objects = Player.o \
.PHONY: default all clean
default: all
%.cpp: %.h
%.o: %.cpp
$(CC) $(CFLAGS) -c -o $@ $<
all: $(objects)
clean:
rm -f $(objects)

View File

@ -38,7 +38,7 @@ void Game::Render(void) {
glRotatef(_rotationAngle, 0, 0, 1);
glBegin(GL_TRIANGLES);
glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
glVertex3f(-1.0f, -0.5f, -4.0f);
glColor4f(1.0f, 1.0f, 0.0f, 1.0f);
glVertex3f(1.0f, -0.5f, -4.0f);