fractal/Makefile

39 lines
1.1 KiB
Makefile
Raw Normal View History

2020-03-07 23:32:57 +01:00
# 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
2020-03-08 22:24:10 +01:00
FRACTAL_OBJ = criticals.o fractal.o julia.o palette.o pnmout.o
2020-03-07 23:32:57 +01:00
FUN_GEN_OBJ = fun-gen.o
2020-03-08 22:24:10 +01:00
UTIL_OBJ = util.o
OBJ = ${FRACTAL_OBJ} ${FUN_GEN_OBJ} ${UTIL_OBJ}
2020-03-07 23:32:57 +01:00
all: fractal
julia.o: fun.h
2020-03-08 22:24:10 +01:00
fractal: ${FRACTAL_OBJ} ${UTIL_OBJ}
${CC} ${LDFLAGS} -o $@ ${FRACTAL_OBJ} ${UTIL_OBJ} -lm
2020-03-07 23:32:57 +01:00
2020-03-08 22:24:10 +01:00
fun-gen: ${FUN_GEN_OBJ} ${UTIL_OBJ}
${CC} ${LDFLAGS} -o $@ ${FUN_GEN_OBJ} ${UTIL_OBJ} -lm
2020-03-07 23:32:57 +01:00
clean:
rm -f ${OBJ} ${BIN} fun.h