From bbc0309591af0600bcd55d704c5d54d478c1c913 Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 11 May 2021 22:44:13 +0200 Subject: [PATCH] source tree refactor and build system (to be completed) --- .gitignore | 115 +++++++++--------- Global.makefile | 6 - Makefile | 88 ++++++++++---- README.md | 25 +++- build.sh | 39 ------ {Fonderie => extras/Fonderie}/Makefile | 0 {Fonderie => extras/Fonderie}/README.md | 0 {Fonderie => extras/Fonderie}/craplist2h.awk | 0 .../Fonderie}/craplist2str.awk | 0 {Fonderie => extras/Fonderie}/crapulator.c | 0 {Fonderie => extras/Fonderie}/crapulator.h | 0 {Fonderie => extras/Fonderie}/crapulors.liste | 0 {Fonderie => extras/Fonderie}/essai.sh | 0 {Fonderie => extras/Fonderie}/fifo.c | 0 {Fonderie => extras/Fonderie}/fifo.h | 0 {Fonderie => extras/Fonderie}/filterstack.c | 0 {Fonderie => extras/Fonderie}/filterstack.h | 0 {Fonderie => extras/Fonderie}/fonderie.c | 0 {Fonderie => extras/Fonderie}/glitches.c | 0 {Fonderie => extras/Fonderie}/glitches.h | 0 {Fonderie => extras/Fonderie}/interpolator.c | 0 {Fonderie => extras/Fonderie}/metriques.c | 0 {Fonderie => extras/Fonderie}/metriques.h | 0 {Fonderie => extras/Fonderie}/notes.md | 0 {Fonderie => extras/Fonderie}/sfx.c | 0 {Fonderie => extras/Fonderie}/sfx.h | 0 {Fonderie => extras/Fonderie}/single.c | 0 {Fonderie => extras/Fonderie}/single.h | 0 {Fonderie => extras/Fonderie}/singlepass.c | 0 {Fonderie => extras/Fonderie}/t.c | 0 essai.c => extras/essai.c | 0 {experiment => extras/experiment}/Makefile | 0 {experiment => extras/experiment}/README.md | 0 .../experiment}/assemblage.c | 0 {experiment => extras/experiment}/essai.sh | 0 .../experiment}/extracteur.c | 0 floatimg.h => src/floatimg.h | 0 {funcs => src/funcs}/Makefile | 20 ++- {funcs => src/funcs}/README.md | 0 {funcs => src/funcs}/alltests.sh | 0 {funcs => src/funcs}/classif.c | 0 {funcs => src/funcs}/contour2x2.c | 0 {funcs => src/funcs}/displacement.c | 0 {funcs => src/funcs}/dithering.c | 0 {funcs => src/funcs}/equalize.c | 0 {funcs => src/funcs}/exporter.c | 0 {funcs => src/funcs}/filtrage.c | 0 {funcs => src/funcs}/fimg-bmp.c | 0 {funcs => src/funcs}/fimg-fits.c | 0 {funcs => src/funcs}/fimg-libpnm.c | 0 {funcs => src/funcs}/fimg-openexr.c | 0 {funcs => src/funcs}/fimg-png.c | 0 {funcs => src/funcs}/fimg-tiff.c | 0 {funcs => src/funcs}/geometry.c | 0 {funcs => src/funcs}/histogram.c | 0 {funcs => src/funcs}/hsv.c | 0 {funcs => src/funcs}/incrustator.c | 0 {funcs => src/funcs}/misc-plots.c | 0 {funcs => src/funcs}/plasmas.c | 0 {funcs => src/funcs}/qsortrgb.c | 0 {funcs => src/funcs}/rampes.c | 0 {funcs => src/funcs}/recurse.c | 0 {funcs => src/funcs}/rotate.c | 0 {funcs => src/funcs}/saturation.c | 0 {funcs => src/funcs}/sfx0.c | 0 {funcs => src/funcs}/sfx1.c | 0 {funcs => src/funcs}/sfx2.c | 0 {funcs => src/funcs}/t.c | 0 {funcs => src/funcs}/tests.c | 0 {funcs => src/funcs}/tests.h | 0 {funcs => src/funcs}/tpnm.c | 0 {funcs => src/funcs}/utils.c | 0 {funcs => src/funcs}/vroum.sh | 0 {lib => src/lib}/Makefile | 26 +++- {lib => src/lib}/contrast.c | 0 {lib => src/lib}/fimg-2gray.c | 0 {lib => src/lib}/fimg-compare.c | 0 {lib => src/lib}/fimg-core.c | 0 {lib => src/lib}/fimg-file.c | 0 {lib => src/lib}/fimg-math.c | 0 {lib => src/lib}/fimg-pnm.c | 0 {lib => src/lib}/fimg-timers.c | 0 {lib => src/lib}/interpolate.c | 0 {lib => src/lib}/operators.c | 0 {lib => src/lib}/runme.sh | 0 {lib => src/lib}/t.c | 0 src/tools/Makefile | 81 ++++++++++++ {tools => src/tools}/README.md | 0 {tools => src/tools}/addpnm2fimg.c | 0 {tools => src/tools}/addtga2fimg.c | 0 {tools => src/tools}/cumulfimgs.c | 0 {tools => src/tools}/fimg2fits.c | 0 {tools => src/tools}/fimg2png.c | 0 {tools => src/tools}/fimg2pnm.c | 0 {tools => src/tools}/fimg2text.c | 0 {tools => src/tools}/fimg2tiff.c | 0 {tools => src/tools}/fimgfx.c | 0 {tools => src/tools}/fimghalfsize.c | 0 {tools => src/tools}/fimgops.c | 0 {tools => src/tools}/fimgstats.c | 0 {tools => src/tools}/mkfimg.c | 0 {tools => src/tools}/png2fimg.c | 0 {v4l2 => src/v4l2}/Makefile | 0 {v4l2 => src/v4l2}/README.md | 0 {v4l2 => src/v4l2}/README.txt | 0 {v4l2 => src/v4l2}/capture.c | 0 {v4l2 => src/v4l2}/essai.sh | 0 {v4l2 => src/v4l2}/exemple.txt | 0 {v4l2 => src/v4l2}/funcs.c | 0 {v4l2 => src/v4l2}/funcs.h | 0 {v4l2 => src/v4l2}/grabvidseq.c | 0 {v4l2 => src/v4l2}/nc-camcontrol.c | 0 {v4l2 => src/v4l2}/notes.txt | 0 {v4l2 => src/v4l2}/rgb2fimg.c | 0 {v4l2 => src/v4l2}/t.c | 0 {v4l2 => src/v4l2}/v4l2_pr_structs.c | 0 {v4l2 => src/v4l2}/v4l2_pr_structs.h | 0 {v4l2 => src/v4l2}/video-infos.c | 0 tools/Makefile | 65 ---------- tools/essai.sh | 58 --------- tools/fx_demo.sh | 26 ---- 121 files changed, 259 insertions(+), 290 deletions(-) delete mode 100644 Global.makefile delete mode 100755 build.sh rename {Fonderie => extras/Fonderie}/Makefile (100%) rename {Fonderie => extras/Fonderie}/README.md (100%) rename {Fonderie => extras/Fonderie}/craplist2h.awk (100%) rename {Fonderie => extras/Fonderie}/craplist2str.awk (100%) rename {Fonderie => extras/Fonderie}/crapulator.c (100%) rename {Fonderie => extras/Fonderie}/crapulator.h (100%) rename {Fonderie => extras/Fonderie}/crapulors.liste (100%) rename {Fonderie => extras/Fonderie}/essai.sh (100%) rename {Fonderie => extras/Fonderie}/fifo.c (100%) rename {Fonderie => extras/Fonderie}/fifo.h (100%) rename {Fonderie => extras/Fonderie}/filterstack.c (100%) rename {Fonderie => extras/Fonderie}/filterstack.h (100%) rename {Fonderie => extras/Fonderie}/fonderie.c (100%) rename {Fonderie => extras/Fonderie}/glitches.c (100%) rename {Fonderie => extras/Fonderie}/glitches.h (100%) rename {Fonderie => extras/Fonderie}/interpolator.c (100%) rename {Fonderie => extras/Fonderie}/metriques.c (100%) rename {Fonderie => extras/Fonderie}/metriques.h (100%) rename {Fonderie => extras/Fonderie}/notes.md (100%) rename {Fonderie => extras/Fonderie}/sfx.c (100%) rename {Fonderie => extras/Fonderie}/sfx.h (100%) rename {Fonderie => extras/Fonderie}/single.c (100%) rename {Fonderie => extras/Fonderie}/single.h (100%) rename {Fonderie => extras/Fonderie}/singlepass.c (100%) rename {Fonderie => extras/Fonderie}/t.c (100%) rename essai.c => extras/essai.c (100%) rename {experiment => extras/experiment}/Makefile (100%) rename {experiment => extras/experiment}/README.md (100%) rename {experiment => extras/experiment}/assemblage.c (100%) rename {experiment => extras/experiment}/essai.sh (100%) rename {experiment => extras/experiment}/extracteur.c (100%) rename floatimg.h => src/floatimg.h (100%) rename {funcs => src/funcs}/Makefile (88%) rename {funcs => src/funcs}/README.md (100%) rename {funcs => src/funcs}/alltests.sh (100%) rename {funcs => src/funcs}/classif.c (100%) rename {funcs => src/funcs}/contour2x2.c (100%) rename {funcs => src/funcs}/displacement.c (100%) rename {funcs => src/funcs}/dithering.c (100%) rename {funcs => src/funcs}/equalize.c (100%) rename {funcs => src/funcs}/exporter.c (100%) rename {funcs => src/funcs}/filtrage.c (100%) rename {funcs => src/funcs}/fimg-bmp.c (100%) rename {funcs => src/funcs}/fimg-fits.c (100%) rename {funcs => src/funcs}/fimg-libpnm.c (100%) rename {funcs => src/funcs}/fimg-openexr.c (100%) rename {funcs => src/funcs}/fimg-png.c (100%) rename {funcs => src/funcs}/fimg-tiff.c (100%) rename {funcs => src/funcs}/geometry.c (100%) rename {funcs => src/funcs}/histogram.c (100%) rename {funcs => src/funcs}/hsv.c (100%) rename {funcs => src/funcs}/incrustator.c (100%) rename {funcs => src/funcs}/misc-plots.c (100%) rename {funcs => src/funcs}/plasmas.c (100%) rename {funcs => src/funcs}/qsortrgb.c (100%) rename {funcs => src/funcs}/rampes.c (100%) rename {funcs => src/funcs}/recurse.c (100%) rename {funcs => src/funcs}/rotate.c (100%) rename {funcs => src/funcs}/saturation.c (100%) rename {funcs => src/funcs}/sfx0.c (100%) rename {funcs => src/funcs}/sfx1.c (100%) rename {funcs => src/funcs}/sfx2.c (100%) rename {funcs => src/funcs}/t.c (100%) rename {funcs => src/funcs}/tests.c (100%) rename {funcs => src/funcs}/tests.h (100%) rename {funcs => src/funcs}/tpnm.c (100%) rename {funcs => src/funcs}/utils.c (100%) rename {funcs => src/funcs}/vroum.sh (100%) rename {lib => src/lib}/Makefile (68%) rename {lib => src/lib}/contrast.c (100%) rename {lib => src/lib}/fimg-2gray.c (100%) rename {lib => src/lib}/fimg-compare.c (100%) rename {lib => src/lib}/fimg-core.c (100%) rename {lib => src/lib}/fimg-file.c (100%) rename {lib => src/lib}/fimg-math.c (100%) rename {lib => src/lib}/fimg-pnm.c (100%) rename {lib => src/lib}/fimg-timers.c (100%) rename {lib => src/lib}/interpolate.c (100%) rename {lib => src/lib}/operators.c (100%) rename {lib => src/lib}/runme.sh (100%) rename {lib => src/lib}/t.c (100%) create mode 100644 src/tools/Makefile rename {tools => src/tools}/README.md (100%) rename {tools => src/tools}/addpnm2fimg.c (100%) rename {tools => src/tools}/addtga2fimg.c (100%) rename {tools => src/tools}/cumulfimgs.c (100%) rename {tools => src/tools}/fimg2fits.c (100%) rename {tools => src/tools}/fimg2png.c (100%) rename {tools => src/tools}/fimg2pnm.c (100%) rename {tools => src/tools}/fimg2text.c (100%) rename {tools => src/tools}/fimg2tiff.c (100%) rename {tools => src/tools}/fimgfx.c (100%) rename {tools => src/tools}/fimghalfsize.c (100%) rename {tools => src/tools}/fimgops.c (100%) rename {tools => src/tools}/fimgstats.c (100%) rename {tools => src/tools}/mkfimg.c (100%) rename {tools => src/tools}/png2fimg.c (100%) rename {v4l2 => src/v4l2}/Makefile (100%) rename {v4l2 => src/v4l2}/README.md (100%) rename {v4l2 => src/v4l2}/README.txt (100%) rename {v4l2 => src/v4l2}/capture.c (100%) rename {v4l2 => src/v4l2}/essai.sh (100%) rename {v4l2 => src/v4l2}/exemple.txt (100%) rename {v4l2 => src/v4l2}/funcs.c (100%) rename {v4l2 => src/v4l2}/funcs.h (100%) rename {v4l2 => src/v4l2}/grabvidseq.c (100%) rename {v4l2 => src/v4l2}/nc-camcontrol.c (100%) rename {v4l2 => src/v4l2}/notes.txt (100%) rename {v4l2 => src/v4l2}/rgb2fimg.c (100%) rename {v4l2 => src/v4l2}/t.c (100%) rename {v4l2 => src/v4l2}/v4l2_pr_structs.c (100%) rename {v4l2 => src/v4l2}/v4l2_pr_structs.h (100%) rename {v4l2 => src/v4l2}/video-infos.c (100%) delete mode 100644 tools/Makefile delete mode 100755 tools/essai.sh delete mode 100755 tools/fx_demo.sh diff --git a/.gitignore b/.gitignore index 07b608f..801c00c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,18 @@ -lib/*.o -lib/t -lib/*.fimg -lib/*.png -lib/*.gif +build +# src/lib/*.o +src/lib/t +src/lib/*.fimg +src/lib/*.png +src/lib/*.gif +*.o *.a gmon.out *.pnm *.fimg -essai -MANIFEST -tarball */*.ps doc/*.toc @@ -26,62 +25,62 @@ doc/*.ind doc/co*.tex doc/foo.html -funcs/t -funcs/*.o -funcs/*.png -funcs/V/* -funcs/*.gif -funcs/*.fits -funcs/*.tiff -funcs/toto +src/funcs/t +src/funcs/*.o +src/funcs/*.png +src/funcs/V/* +src/src/funcs/*.gif +src/funcs/*.fits +src/funcs/*.tiff +src/funcs/toto scripts/*.fimg scripts/*.pnm scripts/*.gif -v4l2/t -v4l2/capture -v4l2/grabvidseq -v4l2/*.o -v4l2/*.ppm -v4l2/*.png -v4l2/*.fits -v4l2/*.tiff -v4l2/video-infos -v4l2/nc-camcontrol +src/v4l2/t +src/v4l2/capture +src/v4l2/grabvidseq +src/v4l2/*.o +src/v4l2/*.ppm +src/v4l2/*.png +src/v4l2/*.fits +src/v4l2/*.tiff +src/v4l2/video-infos +src/v4l2/nc-camcontrol -tools/fimg2png -tools/fimg2pnm -tools/fimg2tiff -tools/fimg2fits -tools/fimg2text -tools/fimgstats -tools/fimghalfsize -tools/mkfimg -tools/png2fimg -tools/addtga2fimg -tools/addpnm2fimg -tools/cumulfimgs -tools/fimgops -tools/fimgfx -tools/*.png -tools/*.tiff +# tools/fimg2png +# tools/fimg2pnm +# tools/fimg2tiff +# tools/fimg2fits +# tools/fimg2text +# tools/fimgstats +# tools/fimghalfsize +# tools/mkfimg +# tools/png2fimg +# tools/addtga2fimg +# tools/addpnm2fimg +# tools/cumulfimgs +# tools/fimgops +# tools/fimgfx +src/tools/*.png +src/tools/*.tiff -Fonderie/*.o -Fonderie/*.png -Fonderie/*.pnm -Fonderie/*.gif -Fonderie/*.fimg -Fonderie/fonderie -Fonderie/interpolator -Fonderie/t -Fonderie/singlepass -Fonderie/crapdef.h -Fonderie/crapstr.h +extras/Fonderie/*.o +extras/Fonderie/*.png +extras/Fonderie/*.pnm +extras/Fonderie/*.gif +extras/Fonderie/*.fimg +extras/extras/Fonderie/fonderie +extras/Fonderie/interpolator +extras/Fonderie/t +extras/Fonderie/singlepass +extras/Fonderie/crapdef.h +extras/Fonderie/crapstr.h -experiment/assemblage -experiment/extracteur -experiment/*.fimg -experiment/*.pnm -experiment/*.o +extras/experiment/assemblage +extras/experiment/extracteur +extras/experiment/*.fimg +extras/experiment/*.pnm +extras/experiment/*.o diff --git a/Global.makefile b/Global.makefile deleted file mode 100644 index 92bf7c5..0000000 --- a/Global.makefile +++ /dev/null @@ -1,6 +0,0 @@ - -# -# This file is the 'grandmasta' of the compilation process. -# for now, this is juste a wip idea. -# - diff --git a/Makefile b/Makefile index 1fb1411..1032d58 100644 --- a/Makefile +++ b/Makefile @@ -1,34 +1,72 @@ -#################################################### -# Before running make, you must have # -# a look to the 'build.sh' script ! # -#################################################### +# CC_OPTS = -Wall -fpic -g -pg -no-pie -DDEBUG_LEVEL=0 +# LD_OPTS = libfloatimg.a -pg -lm -COPT = -Wall -fpic -g -pg -no-pie -DDEBUG_LEVEL=0 -LDOPT = libfloatimg.a -pg -lm +LIB_DIR = build/lib -all: essai +OBJ_DIR = build/obj -#--------------------------------------------------------------- +STATIC_LIB = $(LIB_DIR)/libfloatimg-lib.a -essai: essai.c libfloatimg.a floatimg.h Makefile - gcc $(COPT) $< $(LDOPT) -lpnglite -lz -o $@ +DYN_LIB = $(LIB_DIR)/libfloatimg.so -#--------------------------------------------------------------- +VERBOSITY = 0 -TOTAR = *.[ch] Makefile *.sh *.md \ - doc/the*.tex doc/mk*.sh doc/*.txt \ - funcs/*.[ch] funcs/Makefile \ - tools/*.[ch] tools/*.sh tools/README.md tools/Makefile \ - v4l2/*.[ch] v4l2/Makefile \ - scripts/*.sh scripts/README.md \ - lib/*.[ch] lib/Makefile +all: lib funcs tools -lines: $(TOTAR) - @wc $(TOTAR) | sort -n +# shared: $(DYN_LIB) -tarball: $(TOTAR) - date > tarball - ls $(TOTAR) | sed 's/^/FloatImg\//' > MANIFEST - ( cd .. ; tar zcvf floatimg.tar.gz `cat FloatImg/MANIFEST` ) +# $(DYN_LIB): lib funcs + +lib: + $(MAKE) -C src/lib all + +funcs: lib + $(MAKE) -C src/funcs + # link lib & funcs for shared library + echo "int verbosity = $(VERBOSITY);" > $(OBJ_DIR)/verbosity.c + gcc -c $(OBJ_DIR)/verbosity.c -o $(OBJ_DIR)/verbosity.o + gcc -shared $(OBJ_DIR)/*.o -lnetpbm -lpnglite -lcfitsio -ltiff -lz -lm -o $(DYN_LIB) + + +tools: + mkdir -p build/bin + $(MAKE) -C src/tools + +clean: + $(MAKE) -C src/lib clean + $(MAKE) -C src/funcs clean + $(MAKE) -C src/tools clean + rm -rf "./build" + +install: all + cp src/floatimg.h /usr/local/include + cp build/lib/* /usr/local/lib + cp build/bin/* /usr/local/bin + + +# all: essai + +# #--------------------------------------------------------------- + +# essai: essai.c libfloatimg.a floatimg.h Makefile +# gcc $(COPT) $< $(LDOPT) -lpnglite -lz -o $@ + +# #--------------------------------------------------------------- + +# TOTAR = *.[ch] Makefile *.sh *.md \ +# doc/the*.tex doc/mk*.sh doc/*.txt \ +# funcs/*.[ch] funcs/Makefile \ +# tools/*.[ch] tools/*.sh tools/README.md tools/Makefile \ +# v4l2/*.[ch] v4l2/Makefile \ +# scripts/*.sh scripts/README.md \ +# lib/*.[ch] lib/Makefile + +# lines: $(TOTAR) +# @wc $(TOTAR) | sort -n + +# tarball: $(TOTAR) +# date > tarball +# ls $(TOTAR) | sed 's/^/FloatImg\//' > MANIFEST +# ( cd .. ; tar zcvf floatimg.tar.gz `cat FloatImg/MANIFEST` ) +# #--------------------------------------------------------------- -#--------------------------------------------------------------- diff --git a/README.md b/README.md index 3eaf074..bd01ab1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,14 @@ +# FloatImg4PythonBinding + +Un fork de la galactique bibliothèque FloatImg de tTh, réaménagé pour permettre une utilisation depuis Python avec l'embryonnaire binding https://git.tetalab.org/Mutah/python-FloatImg/ (seulement sur la branche develop pour le moment) + +Pas de révolution mais : + + - production d'une bibliothèque partagée + - arborescence remanié : les meubles ont changés de place : les sources sont dans `src`, les expérimentations dans `extra` et les binaires sont produits dans `build` + - build system : un Makefile racine avec des cibles générales : `all` pour tout builder, `lib` pour la bibliothèque de base, `funcs` + + # Traitement des images en virgule flottante. C'est d"abord un ensemble de fonctions pour traiter des images avec une énorme dynamique @@ -30,15 +41,17 @@ Bien entendu, avant tout, il faut installer quelques outils et dépendances. Je vais tenter de les lister dans le plus grand désordre (à la sauce Debian) : +```bash +sudo apt install libtiff-dev libpnglite-dev liblo-dev libv4l2-dev libcfitsio-dev libnetpbm-dev ``` -apt install libtiff-dev -apt install libpnglite-dev -apt install liblo-dev -apt install libv4l2-dev -apt install libcfitsio-dev -apt install libnetpbm-dev + +Sauce Ubuntu : + +```bash +sudo apt install libtiff-dev libpnglite-dev liblo-dev libv4l-dev libcfitsio-dev libnetpbm10-dev libncurses5-dev ``` + Certains outils externes sont aussi utiles : - gnuplot diff --git a/build.sh b/build.sh deleted file mode 100755 index 46c2266..0000000 --- a/build.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -# ------------------------------------------------------------------ - -function build -{ -echo ============= $1 ============== -curdir=${PWD} -cd $1 -make -error=$? -cd ${curdir} - -if [ ${error} -ne 0 ] -then - echo === error on $1 = ${error} - exit 1 -fi -} - -# ------------------------------------------------------------------ - -build lib -build funcs -build tools -build v4l2 -build Fonderie - -# ------------------------------------------------------------------ - - -make - -# ------------------------------------------------------------------ - - - - - diff --git a/Fonderie/Makefile b/extras/Fonderie/Makefile similarity index 100% rename from Fonderie/Makefile rename to extras/Fonderie/Makefile diff --git a/Fonderie/README.md b/extras/Fonderie/README.md similarity index 100% rename from Fonderie/README.md rename to extras/Fonderie/README.md diff --git a/Fonderie/craplist2h.awk b/extras/Fonderie/craplist2h.awk similarity index 100% rename from Fonderie/craplist2h.awk rename to extras/Fonderie/craplist2h.awk diff --git a/Fonderie/craplist2str.awk b/extras/Fonderie/craplist2str.awk similarity index 100% rename from Fonderie/craplist2str.awk rename to extras/Fonderie/craplist2str.awk diff --git a/Fonderie/crapulator.c b/extras/Fonderie/crapulator.c similarity index 100% rename from Fonderie/crapulator.c rename to extras/Fonderie/crapulator.c diff --git a/Fonderie/crapulator.h b/extras/Fonderie/crapulator.h similarity index 100% rename from Fonderie/crapulator.h rename to extras/Fonderie/crapulator.h diff --git a/Fonderie/crapulors.liste b/extras/Fonderie/crapulors.liste similarity index 100% rename from Fonderie/crapulors.liste rename to extras/Fonderie/crapulors.liste diff --git a/Fonderie/essai.sh b/extras/Fonderie/essai.sh similarity index 100% rename from Fonderie/essai.sh rename to extras/Fonderie/essai.sh diff --git a/Fonderie/fifo.c b/extras/Fonderie/fifo.c similarity index 100% rename from Fonderie/fifo.c rename to extras/Fonderie/fifo.c diff --git a/Fonderie/fifo.h b/extras/Fonderie/fifo.h similarity index 100% rename from Fonderie/fifo.h rename to extras/Fonderie/fifo.h diff --git a/Fonderie/filterstack.c b/extras/Fonderie/filterstack.c similarity index 100% rename from Fonderie/filterstack.c rename to extras/Fonderie/filterstack.c diff --git a/Fonderie/filterstack.h b/extras/Fonderie/filterstack.h similarity index 100% rename from Fonderie/filterstack.h rename to extras/Fonderie/filterstack.h diff --git a/Fonderie/fonderie.c b/extras/Fonderie/fonderie.c similarity index 100% rename from Fonderie/fonderie.c rename to extras/Fonderie/fonderie.c diff --git a/Fonderie/glitches.c b/extras/Fonderie/glitches.c similarity index 100% rename from Fonderie/glitches.c rename to extras/Fonderie/glitches.c diff --git a/Fonderie/glitches.h b/extras/Fonderie/glitches.h similarity index 100% rename from Fonderie/glitches.h rename to extras/Fonderie/glitches.h diff --git a/Fonderie/interpolator.c b/extras/Fonderie/interpolator.c similarity index 100% rename from Fonderie/interpolator.c rename to extras/Fonderie/interpolator.c diff --git a/Fonderie/metriques.c b/extras/Fonderie/metriques.c similarity index 100% rename from Fonderie/metriques.c rename to extras/Fonderie/metriques.c diff --git a/Fonderie/metriques.h b/extras/Fonderie/metriques.h similarity index 100% rename from Fonderie/metriques.h rename to extras/Fonderie/metriques.h diff --git a/Fonderie/notes.md b/extras/Fonderie/notes.md similarity index 100% rename from Fonderie/notes.md rename to extras/Fonderie/notes.md diff --git a/Fonderie/sfx.c b/extras/Fonderie/sfx.c similarity index 100% rename from Fonderie/sfx.c rename to extras/Fonderie/sfx.c diff --git a/Fonderie/sfx.h b/extras/Fonderie/sfx.h similarity index 100% rename from Fonderie/sfx.h rename to extras/Fonderie/sfx.h diff --git a/Fonderie/single.c b/extras/Fonderie/single.c similarity index 100% rename from Fonderie/single.c rename to extras/Fonderie/single.c diff --git a/Fonderie/single.h b/extras/Fonderie/single.h similarity index 100% rename from Fonderie/single.h rename to extras/Fonderie/single.h diff --git a/Fonderie/singlepass.c b/extras/Fonderie/singlepass.c similarity index 100% rename from Fonderie/singlepass.c rename to extras/Fonderie/singlepass.c diff --git a/Fonderie/t.c b/extras/Fonderie/t.c similarity index 100% rename from Fonderie/t.c rename to extras/Fonderie/t.c diff --git a/essai.c b/extras/essai.c similarity index 100% rename from essai.c rename to extras/essai.c diff --git a/experiment/Makefile b/extras/experiment/Makefile similarity index 100% rename from experiment/Makefile rename to extras/experiment/Makefile diff --git a/experiment/README.md b/extras/experiment/README.md similarity index 100% rename from experiment/README.md rename to extras/experiment/README.md diff --git a/experiment/assemblage.c b/extras/experiment/assemblage.c similarity index 100% rename from experiment/assemblage.c rename to extras/experiment/assemblage.c diff --git a/experiment/essai.sh b/extras/experiment/essai.sh similarity index 100% rename from experiment/essai.sh rename to extras/experiment/essai.sh diff --git a/experiment/extracteur.c b/extras/experiment/extracteur.c similarity index 100% rename from experiment/extracteur.c rename to extras/experiment/extracteur.c diff --git a/floatimg.h b/src/floatimg.h similarity index 100% rename from floatimg.h rename to src/floatimg.h diff --git a/funcs/Makefile b/src/funcs/Makefile similarity index 88% rename from funcs/Makefile rename to src/funcs/Makefile index 1b27ebb..2a10d24 100644 --- a/funcs/Makefile +++ b/src/funcs/Makefile @@ -2,8 +2,16 @@ # Please, use the 'Gloabl.makefile' system ! +LIB_DIR = ../../build/lib + +OBJ_DIR = ../../build/obj + +STATIC_LIB = $(LIB_DIR)/libfloatimg.a + +DYN_OBJ = $(OBJ_DIR)/libfloatimg-funcs.o COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=0 + DEPS = ../floatimg.h Makefile OBJS = fimg-png.o fimg-tiff.o misc-plots.o filtrage.o utils.o \ @@ -14,6 +22,8 @@ OBJS = fimg-png.o fimg-tiff.o misc-plots.o filtrage.o utils.o \ displacement.o dithering.o plasmas.o incrustator.o \ recurse.o + +all: $(OBJS) $(STATIC_LIB) $(DYN_OBJ) #--------------------------------------------------------------- t: t.c $(DEPS) ../libfloatimg.a tests.o @@ -31,10 +41,16 @@ tests.o: tests.c tests.h $(DEPS) #--------------------------------------------------------------- # upper-level functions -../libfloatimg.a: $(OBJS) +$(STATIC_LIB): $(OBJS) $(AR) r $@ $? -# ### + +$(DYN_OBJ): $(OBJS) + mkdir -p $(OBJ_DIR) + ld -Ur -o $@ $? + +clean: + rm -rf $(OBJS) $(STATIC_LIB) $(DYN_OBJ) recurse.o: recurse.c $(DEPS) gcc $(COPT) -c $< diff --git a/funcs/README.md b/src/funcs/README.md similarity index 100% rename from funcs/README.md rename to src/funcs/README.md diff --git a/funcs/alltests.sh b/src/funcs/alltests.sh similarity index 100% rename from funcs/alltests.sh rename to src/funcs/alltests.sh diff --git a/funcs/classif.c b/src/funcs/classif.c similarity index 100% rename from funcs/classif.c rename to src/funcs/classif.c diff --git a/funcs/contour2x2.c b/src/funcs/contour2x2.c similarity index 100% rename from funcs/contour2x2.c rename to src/funcs/contour2x2.c diff --git a/funcs/displacement.c b/src/funcs/displacement.c similarity index 100% rename from funcs/displacement.c rename to src/funcs/displacement.c diff --git a/funcs/dithering.c b/src/funcs/dithering.c similarity index 100% rename from funcs/dithering.c rename to src/funcs/dithering.c diff --git a/funcs/equalize.c b/src/funcs/equalize.c similarity index 100% rename from funcs/equalize.c rename to src/funcs/equalize.c diff --git a/funcs/exporter.c b/src/funcs/exporter.c similarity index 100% rename from funcs/exporter.c rename to src/funcs/exporter.c diff --git a/funcs/filtrage.c b/src/funcs/filtrage.c similarity index 100% rename from funcs/filtrage.c rename to src/funcs/filtrage.c diff --git a/funcs/fimg-bmp.c b/src/funcs/fimg-bmp.c similarity index 100% rename from funcs/fimg-bmp.c rename to src/funcs/fimg-bmp.c diff --git a/funcs/fimg-fits.c b/src/funcs/fimg-fits.c similarity index 100% rename from funcs/fimg-fits.c rename to src/funcs/fimg-fits.c diff --git a/funcs/fimg-libpnm.c b/src/funcs/fimg-libpnm.c similarity index 100% rename from funcs/fimg-libpnm.c rename to src/funcs/fimg-libpnm.c diff --git a/funcs/fimg-openexr.c b/src/funcs/fimg-openexr.c similarity index 100% rename from funcs/fimg-openexr.c rename to src/funcs/fimg-openexr.c diff --git a/funcs/fimg-png.c b/src/funcs/fimg-png.c similarity index 100% rename from funcs/fimg-png.c rename to src/funcs/fimg-png.c diff --git a/funcs/fimg-tiff.c b/src/funcs/fimg-tiff.c similarity index 100% rename from funcs/fimg-tiff.c rename to src/funcs/fimg-tiff.c diff --git a/funcs/geometry.c b/src/funcs/geometry.c similarity index 100% rename from funcs/geometry.c rename to src/funcs/geometry.c diff --git a/funcs/histogram.c b/src/funcs/histogram.c similarity index 100% rename from funcs/histogram.c rename to src/funcs/histogram.c diff --git a/funcs/hsv.c b/src/funcs/hsv.c similarity index 100% rename from funcs/hsv.c rename to src/funcs/hsv.c diff --git a/funcs/incrustator.c b/src/funcs/incrustator.c similarity index 100% rename from funcs/incrustator.c rename to src/funcs/incrustator.c diff --git a/funcs/misc-plots.c b/src/funcs/misc-plots.c similarity index 100% rename from funcs/misc-plots.c rename to src/funcs/misc-plots.c diff --git a/funcs/plasmas.c b/src/funcs/plasmas.c similarity index 100% rename from funcs/plasmas.c rename to src/funcs/plasmas.c diff --git a/funcs/qsortrgb.c b/src/funcs/qsortrgb.c similarity index 100% rename from funcs/qsortrgb.c rename to src/funcs/qsortrgb.c diff --git a/funcs/rampes.c b/src/funcs/rampes.c similarity index 100% rename from funcs/rampes.c rename to src/funcs/rampes.c diff --git a/funcs/recurse.c b/src/funcs/recurse.c similarity index 100% rename from funcs/recurse.c rename to src/funcs/recurse.c diff --git a/funcs/rotate.c b/src/funcs/rotate.c similarity index 100% rename from funcs/rotate.c rename to src/funcs/rotate.c diff --git a/funcs/saturation.c b/src/funcs/saturation.c similarity index 100% rename from funcs/saturation.c rename to src/funcs/saturation.c diff --git a/funcs/sfx0.c b/src/funcs/sfx0.c similarity index 100% rename from funcs/sfx0.c rename to src/funcs/sfx0.c diff --git a/funcs/sfx1.c b/src/funcs/sfx1.c similarity index 100% rename from funcs/sfx1.c rename to src/funcs/sfx1.c diff --git a/funcs/sfx2.c b/src/funcs/sfx2.c similarity index 100% rename from funcs/sfx2.c rename to src/funcs/sfx2.c diff --git a/funcs/t.c b/src/funcs/t.c similarity index 100% rename from funcs/t.c rename to src/funcs/t.c diff --git a/funcs/tests.c b/src/funcs/tests.c similarity index 100% rename from funcs/tests.c rename to src/funcs/tests.c diff --git a/funcs/tests.h b/src/funcs/tests.h similarity index 100% rename from funcs/tests.h rename to src/funcs/tests.h diff --git a/funcs/tpnm.c b/src/funcs/tpnm.c similarity index 100% rename from funcs/tpnm.c rename to src/funcs/tpnm.c diff --git a/funcs/utils.c b/src/funcs/utils.c similarity index 100% rename from funcs/utils.c rename to src/funcs/utils.c diff --git a/funcs/vroum.sh b/src/funcs/vroum.sh similarity index 100% rename from funcs/vroum.sh rename to src/funcs/vroum.sh diff --git a/lib/Makefile b/src/lib/Makefile similarity index 68% rename from lib/Makefile rename to src/lib/Makefile index 0f3dfea..a1f0f89 100644 --- a/lib/Makefile +++ b/src/lib/Makefile @@ -2,6 +2,14 @@ # building the base library # +LIB_DIR = ../../build/lib + +STATIC_LIB = $(LIB_DIR)/libfloatimg.a + +OBJ_DIR = ../../build/obj + +DYN_OBJ = $(OBJ_DIR)/libfloatimg-lib.o + COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=0 OBJS = fimg-core.o fimg-pnm.o fimg-file.o fimg-math.o \ @@ -11,18 +19,26 @@ OBJS = fimg-core.o fimg-pnm.o fimg-file.o fimg-math.o \ DEPS = Makefile ../floatimg.h # modify it 'as you like' -AR=ar +AR=ar -all: $(OBJS) ../libfloatimg.a +all: $(OBJS) $(STATIC_LIB) $(DYN_OBJ) -t: t.c ../libfloatimg.a $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -lpnglite -lz -lm -o $@ +# t: t.c ../libfloatimg.a $(DEPS) +# gcc $(COPT) $< ../libfloatimg.a -lpnglite -lz -lm -o $@ + +clean: + rm -rf $(OBJS) $(STATIC_LIB) $(DYN_OBJ) # -------------------------------------------- -../libfloatimg.a: $(OBJS) +$(STATIC_LIB): $(OBJS) + mkdir -p $(LIB_DIR) $(AR) r $@ $? +$(DYN_OBJ): $(OBJS) # verbosity.o + mkdir -p $(OBJ_DIR) + ld -Ur -o $@ $? + fimg-core.o: fimg-core.c $(DEPS) gcc $(COPT) -c $< diff --git a/lib/contrast.c b/src/lib/contrast.c similarity index 100% rename from lib/contrast.c rename to src/lib/contrast.c diff --git a/lib/fimg-2gray.c b/src/lib/fimg-2gray.c similarity index 100% rename from lib/fimg-2gray.c rename to src/lib/fimg-2gray.c diff --git a/lib/fimg-compare.c b/src/lib/fimg-compare.c similarity index 100% rename from lib/fimg-compare.c rename to src/lib/fimg-compare.c diff --git a/lib/fimg-core.c b/src/lib/fimg-core.c similarity index 100% rename from lib/fimg-core.c rename to src/lib/fimg-core.c diff --git a/lib/fimg-file.c b/src/lib/fimg-file.c similarity index 100% rename from lib/fimg-file.c rename to src/lib/fimg-file.c diff --git a/lib/fimg-math.c b/src/lib/fimg-math.c similarity index 100% rename from lib/fimg-math.c rename to src/lib/fimg-math.c diff --git a/lib/fimg-pnm.c b/src/lib/fimg-pnm.c similarity index 100% rename from lib/fimg-pnm.c rename to src/lib/fimg-pnm.c diff --git a/lib/fimg-timers.c b/src/lib/fimg-timers.c similarity index 100% rename from lib/fimg-timers.c rename to src/lib/fimg-timers.c diff --git a/lib/interpolate.c b/src/lib/interpolate.c similarity index 100% rename from lib/interpolate.c rename to src/lib/interpolate.c diff --git a/lib/operators.c b/src/lib/operators.c similarity index 100% rename from lib/operators.c rename to src/lib/operators.c diff --git a/lib/runme.sh b/src/lib/runme.sh similarity index 100% rename from lib/runme.sh rename to src/lib/runme.sh diff --git a/lib/t.c b/src/lib/t.c similarity index 100% rename from lib/t.c rename to src/lib/t.c diff --git a/src/tools/Makefile b/src/tools/Makefile new file mode 100644 index 0000000..a41e307 --- /dev/null +++ b/src/tools/Makefile @@ -0,0 +1,81 @@ +# +# makefile for floatimg tools +# use with caution +# +# PLEASE ! update to the 'Global.makefile' concept ! +# + +COPT = -Wall -fpic -g -DDEBUG_LEVEL=0 + +LD_OPTS = -lm + +STATIC_LIB = ../../build/lib/libfloatimg.a + +DEPS = ../floatimg.h $(STATIC_LIB) Makefile + +BIN_DIR = ../../build/bin + +EXECUTABLES = $(BIN_DIR)/fimg2pnm $(BIN_DIR)/mkfimg $(BIN_DIR)/png2fimg \ + $(BIN_DIR)/fimgstats $(BIN_DIR)/fimg2png $(BIN_DIR)/fimg2tiff \ + $(BIN_DIR)/fimg2text $(BIN_DIR)/fimg2fits $(BIN_DIR)/addpnm2fimg \ + $(BIN_DIR)/cumulfimgs $(BIN_DIR)/fimgops $(BIN_DIR)/fimgfx \ + $(BIN_DIR)/fimghalfsize + +# ---------- + +all: fimg2pnm mkfimg png2fimg fimgstats fimg2png \ + fimg2tiff fimg2text fimg2fits \ + addpnm2fimg cumulfimgs fimgops fimgfx \ + fimghalfsize + +clean: + rm -rf $(EXECUTABLES) + +fimgstats: fimgstats.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -o $(BIN_DIR)/$@ $(LD_OPTS) + +cumulfimgs: cumulfimgs.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -o $(BIN_DIR)/$@ $(LD_OPTS) + +mkfimg: mkfimg.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -o $(BIN_DIR)/$@ $(LD_OPTS) + +fimgops: fimgops.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -o $(BIN_DIR)/$@ $(LD_OPTS) + +fimgfx: fimgfx.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -o $(BIN_DIR)/$@ $(LD_OPTS) + +fimghalfsize: fimghalfsize.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -o $(BIN_DIR)/$@ $(LD_OPTS) + +fimg2pnm: fimg2pnm.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -o $(BIN_DIR)/$@ $(LD_OPTS) + +fimg2fits: fimg2fits.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -lcfitsio -o $(BIN_DIR)/$@ $(LD_OPTS) + +fimg2png: fimg2png.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -lpnglite -lz -o $(BIN_DIR)/$@ $(LD_OPTS) + +fimg2text: fimg2text.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -o $(BIN_DIR)/$@ $(LD_OPTS) + +fimg2tiff: fimg2tiff.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -ltiff -o $(BIN_DIR)/$@ $(LD_OPTS) + +# +# this tool require an external library +# http://la.buvette.org/devel/libimage/libimage.html +# +addtga2fimg: addtga2fimg.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -limageSO -o $(BIN_DIR)/$@ $(LD_OPTS) + +addpnm2fimg: addpnm2fimg.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -o $(BIN_DIR)/$@ $(LD_OPTS) + + +# if "undefined reference to crc32" then "use -lz" +png2fimg: png2fimg.c $(DEPS) + gcc $(COPT) $< $(STATIC_LIB) -lpnglite -lz -o $(BIN_DIR)/$@ $(LD_OPTS) + diff --git a/tools/README.md b/src/tools/README.md similarity index 100% rename from tools/README.md rename to src/tools/README.md diff --git a/tools/addpnm2fimg.c b/src/tools/addpnm2fimg.c similarity index 100% rename from tools/addpnm2fimg.c rename to src/tools/addpnm2fimg.c diff --git a/tools/addtga2fimg.c b/src/tools/addtga2fimg.c similarity index 100% rename from tools/addtga2fimg.c rename to src/tools/addtga2fimg.c diff --git a/tools/cumulfimgs.c b/src/tools/cumulfimgs.c similarity index 100% rename from tools/cumulfimgs.c rename to src/tools/cumulfimgs.c diff --git a/tools/fimg2fits.c b/src/tools/fimg2fits.c similarity index 100% rename from tools/fimg2fits.c rename to src/tools/fimg2fits.c diff --git a/tools/fimg2png.c b/src/tools/fimg2png.c similarity index 100% rename from tools/fimg2png.c rename to src/tools/fimg2png.c diff --git a/tools/fimg2pnm.c b/src/tools/fimg2pnm.c similarity index 100% rename from tools/fimg2pnm.c rename to src/tools/fimg2pnm.c diff --git a/tools/fimg2text.c b/src/tools/fimg2text.c similarity index 100% rename from tools/fimg2text.c rename to src/tools/fimg2text.c diff --git a/tools/fimg2tiff.c b/src/tools/fimg2tiff.c similarity index 100% rename from tools/fimg2tiff.c rename to src/tools/fimg2tiff.c diff --git a/tools/fimgfx.c b/src/tools/fimgfx.c similarity index 100% rename from tools/fimgfx.c rename to src/tools/fimgfx.c diff --git a/tools/fimghalfsize.c b/src/tools/fimghalfsize.c similarity index 100% rename from tools/fimghalfsize.c rename to src/tools/fimghalfsize.c diff --git a/tools/fimgops.c b/src/tools/fimgops.c similarity index 100% rename from tools/fimgops.c rename to src/tools/fimgops.c diff --git a/tools/fimgstats.c b/src/tools/fimgstats.c similarity index 100% rename from tools/fimgstats.c rename to src/tools/fimgstats.c diff --git a/tools/mkfimg.c b/src/tools/mkfimg.c similarity index 100% rename from tools/mkfimg.c rename to src/tools/mkfimg.c diff --git a/tools/png2fimg.c b/src/tools/png2fimg.c similarity index 100% rename from tools/png2fimg.c rename to src/tools/png2fimg.c diff --git a/v4l2/Makefile b/src/v4l2/Makefile similarity index 100% rename from v4l2/Makefile rename to src/v4l2/Makefile diff --git a/v4l2/README.md b/src/v4l2/README.md similarity index 100% rename from v4l2/README.md rename to src/v4l2/README.md diff --git a/v4l2/README.txt b/src/v4l2/README.txt similarity index 100% rename from v4l2/README.txt rename to src/v4l2/README.txt diff --git a/v4l2/capture.c b/src/v4l2/capture.c similarity index 100% rename from v4l2/capture.c rename to src/v4l2/capture.c diff --git a/v4l2/essai.sh b/src/v4l2/essai.sh similarity index 100% rename from v4l2/essai.sh rename to src/v4l2/essai.sh diff --git a/v4l2/exemple.txt b/src/v4l2/exemple.txt similarity index 100% rename from v4l2/exemple.txt rename to src/v4l2/exemple.txt diff --git a/v4l2/funcs.c b/src/v4l2/funcs.c similarity index 100% rename from v4l2/funcs.c rename to src/v4l2/funcs.c diff --git a/v4l2/funcs.h b/src/v4l2/funcs.h similarity index 100% rename from v4l2/funcs.h rename to src/v4l2/funcs.h diff --git a/v4l2/grabvidseq.c b/src/v4l2/grabvidseq.c similarity index 100% rename from v4l2/grabvidseq.c rename to src/v4l2/grabvidseq.c diff --git a/v4l2/nc-camcontrol.c b/src/v4l2/nc-camcontrol.c similarity index 100% rename from v4l2/nc-camcontrol.c rename to src/v4l2/nc-camcontrol.c diff --git a/v4l2/notes.txt b/src/v4l2/notes.txt similarity index 100% rename from v4l2/notes.txt rename to src/v4l2/notes.txt diff --git a/v4l2/rgb2fimg.c b/src/v4l2/rgb2fimg.c similarity index 100% rename from v4l2/rgb2fimg.c rename to src/v4l2/rgb2fimg.c diff --git a/v4l2/t.c b/src/v4l2/t.c similarity index 100% rename from v4l2/t.c rename to src/v4l2/t.c diff --git a/v4l2/v4l2_pr_structs.c b/src/v4l2/v4l2_pr_structs.c similarity index 100% rename from v4l2/v4l2_pr_structs.c rename to src/v4l2/v4l2_pr_structs.c diff --git a/v4l2/v4l2_pr_structs.h b/src/v4l2/v4l2_pr_structs.h similarity index 100% rename from v4l2/v4l2_pr_structs.h rename to src/v4l2/v4l2_pr_structs.h diff --git a/v4l2/video-infos.c b/src/v4l2/video-infos.c similarity index 100% rename from v4l2/video-infos.c rename to src/v4l2/video-infos.c diff --git a/tools/Makefile b/tools/Makefile deleted file mode 100644 index ef8c091..0000000 --- a/tools/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# makefile for floatimg tools -# use with caution -# -# PLEASE ! update to the 'Global.makefile' concept ! -# - -COPT = -Wall -fpic -g -DDEBUG_LEVEL=0 -lm -DEPS = ../floatimg.h ../libfloatimg.a Makefile - -# ---------- - -all: fimg2pnm mkfimg png2fimg fimgstats fimg2png \ - fimg2tiff fimg2text fimg2fits \ - addpnm2fimg cumulfimgs fimgops fimgfx \ - fimghalfsize - -fimgstats: fimgstats.c $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -o $@ - -cumulfimgs: cumulfimgs.c $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -o $@ - -mkfimg: mkfimg.c $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -o $@ - -fimgops: fimgops.c $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -o $@ - -fimgfx: fimgfx.c $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -o $@ - -fimghalfsize: fimghalfsize.c $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -o $@ - -fimg2pnm: fimg2pnm.c $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -o $@ - -fimg2fits: fimg2fits.c $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -lcfitsio -o $@ - -fimg2png: fimg2png.c $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -lpnglite -lz -o $@ - -fimg2text: fimg2text.c $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -o $@ - -fimg2tiff: fimg2tiff.c $(DEPS) - gcc $(COPT) $< ../libfloatimg.a -ltiff -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 -o $@ - diff --git a/tools/essai.sh b/tools/essai.sh deleted file mode 100755 index 109f1c7..0000000 --- a/tools/essai.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -# -# essai des differents outils -# - -# ----------------------------------------------------- - -TMPF="../funcs/in.fimg" - -# ----------------------------------------------------- -function essai_rot90 -{ -echo "=== " $0 " ===" -./mkfimg -v -t hdeg $TMPF 800 600 -./fimg2png -v $TMPF foo.png -./fimgfx -v rot90 $TMPF bar.fimg -} -# ----------------------------------------------------- -function essai_drand48 -{ -./mkfimg -vv -t drand48 $TMPF 800 600 -./fimgstats -vv $TMPF -} -# ----------------------------------------------------- -function essai_cmixa -{ -./mkfimg -vv -t tpat0 $TMPF 800 600 -./fimgfx -vv cmixa $TMPF bar.fimg -} -# ----------------------------------------------------- -function essai_cumulator -{ -D=" 800 600 " -./mkfimg -v -t hdeg hdeg.fimg $D -./mkfimg -v -t vdeg vdeg.fimg $D -./mkfimg -v -t drand48 rand.fimg $D -./mkfimg -v -t tpat0 pat0.fimg $D - -./cumulfimgs -v -g -o foo.fimg \ - hdeg.fimg pat0.fimg rand.fimg vdeg.fimg -} -# ----------------------------------------------------- -function essai_contour -{ -./mkfimg -vv -t tpat0 $TMPF 800 600 -./fimgfx -vv ctr2x2 $TMPF bar.fimg -} -# ----------------------------------------------------- -function essai_hilight -{ -./fimgfx -vv hilightr $TMPF bar.fimg -} -# ----------------------------------------------------- - -essai_hilight - -# ----------------------------------------------------- diff --git a/tools/fx_demo.sh b/tools/fx_demo.sh deleted file mode 100755 index dc56b40..0000000 --- a/tools/fx_demo.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -SRC="in.fimg" -K="0.414" -TMP="/tmp/foo.fimg" - -for fx in $(./fimgfx -l) -do - - printf "========== %-12s =========\n" $fx - - outfile=$(printf "/tmp/fx_%s.png" $fx) - echo $outfile - - rm $TMP - ./fimgfx -v -k $K $fx $SRC $TMP - if [ $? \!= 0 ] ; then - echo error $? - exit 1 - fi - - ./fimg2png -v $TMP $outfile - - echo ; sleep 1 - -done