FloatImg/tools/Makefile
2023-01-21 09:06:36 +01:00

75 lines
1.8 KiB
Makefile

#
# makefile for floatimg tools
# use with caution
#
# PLEASE ! update to the 'Global.makefile' concept !
#
COPT = -Wall -Wextra -fpic -g -DDEBUG_LEVEL=0
DEPS = ../floatimg.h ../libfloatimg.a Makefile
# ----------
all: fimg2pnm mkfimg png2fimg fimgstats fimg2png \
fimg2tiff fimg2text fimg2fits \
addpnm2fimg cumulfimgs fimgops fimgfx \
fimgmetadata \
fimghalfsize fimgextract
fimgmetadata: fimgmetadata.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
fimgextract: fimgextract.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
fimgstats: fimgstats.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
cumulfimgs: cumulfimgs.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lcfitsio \
-ltiff -lpnglite -lz -lm -o $@
mkfimg: mkfimg.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
fimgops: fimgops.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -o $@
fimgfx: fimgfx.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a \
-ltiff -lpnglite -lcfitsio -lm -o $@
fimghalfsize: fimghalfsize.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
fimg2pnm: fimg2pnm.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
fimg2fits: fimg2fits.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lcfitsio -o $@
fimg2png: fimg2png.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lpnglite -lz -lm -o $@
fimg2text: fimg2text.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
fimg2tiff: fimg2tiff.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -ltiff -lm -o $@
#
# this tool require an external library
# http://la.buvette.org/devel/libimage/libimage.html
#
addtga2fimg: addtga2fimg.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -limageSO -lm -o $@
addpnm2fimg: addpnm2fimg.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
# if "undefined reference to crc32" then "use -lz"
png2fimg: png2fimg.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lpnglite -lz -lm -o $@