2013-08-29 19:31:20 +02:00
|
|
|
# MandelCL Makefile
|
|
|
|
CC=gcc
|
|
|
|
|
|
|
|
# Flags!
|
|
|
|
SDLFLAGS=$(shell sdl-config --cflags)
|
|
|
|
|
|
|
|
# Comment this line and uncomment the next to get Julia fractals
|
2013-08-31 17:48:20 +02:00
|
|
|
CFLAGS=-c -Wall -O2 $(SDLFLAGS)
|
|
|
|
# CFLAGS=-c -Wall -O2 -DJULIA $(SDLFLAGS)
|
2013-08-29 19:31:20 +02:00
|
|
|
# CFLAGS=-c -Wall -ggdb $(SDLFLAGS)
|
|
|
|
|
|
|
|
# Libs!
|
|
|
|
SDLLIBS=$(shell sdl-config --libs)
|
2013-08-31 17:48:20 +02:00
|
|
|
OPENCLLIBS=-lOpenCL
|
2013-08-29 19:31:20 +02:00
|
|
|
|
|
|
|
LIBS=-lm -lpthread $(SDLLIBS)
|
|
|
|
|
|
|
|
# Includes!
|
|
|
|
|
2013-08-31 17:48:20 +02:00
|
|
|
INCLUDE=-I/usr/include/SDL -I./
|
2013-08-29 19:31:20 +02:00
|
|
|
|
2013-08-31 17:48:20 +02:00
|
|
|
all: mandelclassic clfract test
|
2013-08-29 19:31:20 +02:00
|
|
|
|
|
|
|
mandelclassic: mandel_classic.o
|
|
|
|
$(CC) $(INCLUDE) mandel_classic.o $(LIBS) -o mandelclassic
|
|
|
|
|
|
|
|
mandelclassic.o: mandel_classic.c
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) $(LIBS) mandel_classic.c -o mandel_classic.o
|
|
|
|
|
2013-08-31 17:48:20 +02:00
|
|
|
clfract: clfract.o
|
|
|
|
$(CC) $(INCLUDE) clfract.o $(LIBS) $(OPENCLLIBS) -o clfract
|
|
|
|
|
|
|
|
clfract.o: main.c
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) $(LIBS) $(OPENCLLIBS) main.c -o clfract.o
|
|
|
|
|
2013-08-29 19:31:20 +02:00
|
|
|
test: test.o
|
|
|
|
$(CC) $(INCLUDE) test.o $(LIBS) -o test
|
|
|
|
|
|
|
|
test.o: test.c
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) $(LIBS) test.c -o test.o
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@rm *.o mandelclassic test
|