pmc/Makefile
changeset 42 83b8151b966d
parent 4 236f8f747073
child 66 2b4f786d9073
--- a/pmc/Makefile
+++ b/pmc/Makefile
@@ -1,28 +1,26 @@
-#!/bin/bash
-
-CC=g++
-LD=ld
-CFLAGS=-Wall -O2 -ansi 
+CC=g++ -g -ggdb
+CFLAGS=-Wall -O2 -ansi
 LDFLAGS=-lSDL
 INCLUDE=include
-CONFIG=-DSTEP=2
-OBJECTS=pmc.o cube.o main.o
+CONFIG=-DSTEP=10
+
+OBJECTS=object.o surface.o vector.o rectangle.o cube.o main.o
+TARGET=pmc
 
 .SUFFIXES: .cc
 
-.cc.o: 
+.cc.o:
 	$(CC) -c $(CFLAGS) -I$(INCLUDE) $(CONFIG) $<
 
-all: pmc 
+all: $(TARGET)
 
 
-pmc: $(OBJECTS)
+$(TARGET): $(OBJECTS)
 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
 
 .PHONY: clean
 
 clean:
 	rm -f *.[oae];
-	rm -f *~;
-	rm -f pmc glcube
-
+	rm -f *~ include/*~
+	rm -f $(TARGET)