39 lines
1.1 KiB
Makefile
39 lines
1.1 KiB
Makefile
# fractal
|
|
# Written in 2020 by Lucas
|
|
# CC0 1.0 Universal/Public domain - No rights reserved
|
|
#
|
|
# To the extent possible under law, the author(s) have dedicated all
|
|
# copyright and related and neighboring rights to this software to the
|
|
# public domain worldwide. This software is distributed without any
|
|
# warranty. You should have received a copy of the CC0 Public Domain
|
|
# Dedication along with this software. If not, see
|
|
# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
.POSIX:
|
|
.SUFFIXES:
|
|
.SUFFIXES: .c .o
|
|
|
|
.c.o:
|
|
${CC} ${FRACTAL_CFLAGS} -c $<
|
|
|
|
FRACTAL_CFLAGS = -O3 -ffast-math -march=native -mtune=native \
|
|
${CFLAGS}
|
|
|
|
BIN = fractal fun-gen
|
|
FRACTAL_OBJ = criticals.o fractal.o julia.o palette.o pnmout.o
|
|
FUN_GEN_OBJ = fun-gen.o
|
|
UTIL_OBJ = util.o
|
|
OBJ = ${FRACTAL_OBJ} ${FUN_GEN_OBJ} ${UTIL_OBJ}
|
|
|
|
all: fractal
|
|
|
|
julia.o: fun.h
|
|
|
|
fractal: ${FRACTAL_OBJ} ${UTIL_OBJ}
|
|
${CC} ${LDFLAGS} -o $@ ${FRACTAL_OBJ} ${UTIL_OBJ} -lm
|
|
|
|
fun-gen: ${FUN_GEN_OBJ} ${UTIL_OBJ}
|
|
${CC} ${LDFLAGS} -o $@ ${FUN_GEN_OBJ} ${UTIL_OBJ} -lm
|
|
|
|
clean:
|
|
rm -f ${OBJ} ${BIN} fun.h
|