graphing
[pub/jan/parprog.git] / openmp / prefix / Makefile
index 211d43329f3c1c0c2f77bf2998a931c42a125e34..95ebbec57dd1951df6b8d6906c0f80aa93efe081 100644 (file)
@@ -1,20 +1,29 @@
 # GCC Makefile
 
 CC      = gcc
-CFLAGS  = -pedantic -Wall -g -fopenmp
+CFLAGS  = -pedantic -Wall -ggdb -fopenmp --std=c99 -O3 ${MYFLAGS}
 LDFLAGS = -fopenmp
 
-BINARIES = prefix
-OBJECTS  = $(BINARIES).o algorithm_1.o algorithm_2.o algorithm_3.o
+all: build/seq build/recurse build/datapar build/hillis
 
-all: prefix
+build/seq: build/prefix.o build/seq.o
+       $(CC) -o $@ $? $(LDFLAGS)
+
+build/recurse: build/prefix.o build/recurse.o
+       $(CC) -o $@ $? $(LDFLAGS)
 
-prefix: prefix.o algorithm_1.o algorithm_2.o algorithm_3.o
+build/datapar: build/prefix.o build/datapar.o
        $(CC) -o $@ $? $(LDFLAGS)
 
-%.o: %.c
-       $(CC) $(CFLAGS) -c $<
+build/hillis: build/prefix.o build/hillis.o
+       $(CC) -o $@ $? $(LDFLAGS)
+
+build/%.o: %.c mkdir
+       $(CC) $(CFLAGS) -c $< -o $@
+
+mkdir:
+       mkdir -p build
 
 .PHONY: clean
 clean:
-       rm -rf $(OBJECTS) $(BINARIES)
+       rm -rf build