Use utility functions

This commit is contained in:
Lucas 2020-03-08 21:24:10 +00:00
parent b13f35e0e6
commit dbd7618c9f
7 changed files with 48 additions and 201 deletions

View file

@ -19,19 +19,20 @@ 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 util.o
FRACTAL_OBJ = criticals.o fractal.o julia.o palette.o pnmout.o
FUN_GEN_OBJ = fun-gen.o
OBJ = ${FRACTAL_OBJ} ${FUN_GEN_OBJ}
UTIL_OBJ = util.o
OBJ = ${FRACTAL_OBJ} ${FUN_GEN_OBJ} ${UTIL_OBJ}
all: fractal
julia.o: fun.h
fractal: ${FRACTAL_OBJ}
${CC} ${LDFLAGS} -o $@ ${FRACTAL_OBJ} -lm
fractal: ${FRACTAL_OBJ} ${UTIL_OBJ}
${CC} ${LDFLAGS} -o $@ ${FRACTAL_OBJ} ${UTIL_OBJ} -lm
fun-gen: ${FUN_GEN_OBJ}
${CC} ${LDFLAGS} -o $@ ${FUN_GEN_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