make the build environment more friendly

master
Michele Guerini Rocco 2020-04-25 23:58:38 +02:00
parent 24f39269e6
commit a2303df612
2 changed files with 21 additions and 3 deletions

View File

@ -6,32 +6,40 @@ CCOMPILE = \
mkdir -p $(@D); \
$(CC) $(CFLAGS) $^ -o $@
ex-1: ex-1/bin/main ex-1/bin/pdf
ex-1/bin/main: ex-1/main.c ex-1/landau.c ex-1/tests.c ex-1/bootstrap.c
$(CCOMPILE)
ex-1/bin/pdf: ex-1/pdf.c
$(CCOMPILE)
ex-2: ex-2/bin/fancy ex-2/bin/fancier ex-2/bin/limit ex-2/bin/naive ex-2/bin/recip
ex-2/bin/%: ex-2/%.c
$(CCOMPILE)
ex-3: ex-3/bin/main
ex-3/bin/main: ex-3/main.c ex-3/common.c ex-3/likelihood.c ex-3/chisquared.c
$(CCOMPILE)
ex-4: ex-4/bin/main
ex-4/bin/main: ex-4/main.c
$(CCOMPILE)
ex-5: ex-5/bin/casino ex-5/bin/manual ex-5/bin/trifecta
ex-5/bin/%: ex-5/%.c
$(CCOMPILE)
ex-6: ex-6/bin/main
ex-6/bin/main: ex-6/main.c ex-6/rl.c ex-6/fft.c
$(CCOMPILE)
ex-7: ex-7/bin/main ex-7/bin/test
ex-7/bin/main: ex-7/main.c ex-7/common.c ex-7/fisher.c ex-7/percep.c
$(CCOMPILE)
ex-7/bin/test: ex-7/test.c ex-7/common.c
$(CCOMPILE)
misc/pdfs: misc/pdfs.c
misc: misc/bin/pdfs
misc/bin/pdfs: misc/pdfs.c
clean:
rm -rf ex-*/bin

View File

@ -1,10 +1,20 @@
with import <nixpkgs> { };
stdenv.mkDerivation {
name = "jeypsi";
name = "analistica";
GMP_PATH = "${gmp}/lib";
buildInputs = with pkgs; [ gdb gsl gmp pkgconfig ];
buildInputs = with pkgs; [
# C dependencies
gsl gmp pkgconfig
# Python
(python3.withPackages (p: [ p.numpy p.matplotlib ]))
# misc
gdb fish
];
shellHook = "exec fish";
}