pmc/Makefile
changeset 42 83b8151b966d
parent 4 236f8f747073
child 66 2b4f786d9073
equal deleted inserted replaced
41:574503cf7bb0 42:83b8151b966d
     1 #!/bin/bash
     1 CC=g++ -g -ggdb
     2 
     2 CFLAGS=-Wall -O2 -ansi
     3 CC=g++
       
     4 LD=ld
       
     5 CFLAGS=-Wall -O2 -ansi 
       
     6 LDFLAGS=-lSDL
     3 LDFLAGS=-lSDL
     7 INCLUDE=include
     4 INCLUDE=include
     8 CONFIG=-DSTEP=2
     5 CONFIG=-DSTEP=10
     9 OBJECTS=pmc.o cube.o main.o
     6 
       
     7 OBJECTS=object.o surface.o vector.o rectangle.o cube.o main.o
       
     8 TARGET=pmc
    10 
     9 
    11 .SUFFIXES: .cc
    10 .SUFFIXES: .cc
    12 
    11 
    13 .cc.o: 
    12 .cc.o:
    14 	$(CC) -c $(CFLAGS) -I$(INCLUDE) $(CONFIG) $<
    13 	$(CC) -c $(CFLAGS) -I$(INCLUDE) $(CONFIG) $<
    15 
    14 
    16 all: pmc 
    15 all: $(TARGET)
    17 
    16 
    18 
    17 
    19 pmc: $(OBJECTS)
    18 $(TARGET): $(OBJECTS)
    20 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
    19 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
    21 
    20 
    22 .PHONY: clean
    21 .PHONY: clean
    23 
    22 
    24 clean:
    23 clean:
    25 	rm -f *.[oae];
    24 	rm -f *.[oae];
    26 	rm -f *~;
    25 	rm -f *~ include/*~
    27 	rm -f pmc glcube
    26 	rm -f $(TARGET)
    28