~ubuntu-branches/ubuntu/hoary/devil/hoary

« back to all changes in this revision

Viewing changes to test/Benchmark/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Marcelo E. Magallon
  • Date: 2005-01-03 19:57:42 UTC
  • Revision ID: james.westby@ubuntu.com-20050103195742-4ipkplcwygu3irv0
Tags: upstream-1.6.7
ImportĀ upstreamĀ versionĀ 1.6.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Unix Makefile
 
2
 
 
3
CC       = gcc
 
4
CFLAGS   = -Wall
 
5
LIBS     = -lX11 -lm -lGL -lGLU -lSDL -lIL -lILU -lILUT -lXext -lXi -lXmu
 
6
 
 
7
SRC     = benchmark.c
 
8
OBJECTS = $(SRC:%.c=.objects/%.o)
 
9
DEPENDS = $(SRC:%.c=.depends/%.d)
 
10
TARGET  = benchmark
 
11
 
 
12
all: $(TARGET)
 
13
 
 
14
$(TARGET): $(OBJECTS)
 
15
        $(CC) $(CFLAGS) $(INCLUDES) $(LIBS) -o $@ $^
 
16
 
 
17
.objects/%.o: %.c
 
18
        @@if [ ! -d $(@D) ]; then mkdir -p $(@D); fi
 
19
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
 
20
 
 
21
.depends/%.d: %.c
 
22
        @@if [ ! -d $(@D) ]; then mkdir -p $(@D); fi
 
23
        $(CC) $(INCLUDES) -MM -MG $< -MT '.objects/$(@F:%.d=%.o)' > $@
 
24
 
 
25
clean:
 
26
        rm -rf $(DEPENDS) $(OBJECTS) $(TARGET)
 
27
 
 
28
-include $(DEPENDS)
 
29