2020-03-06 02:24:32 +01:00
|
|
|
GMP_FLAGS = -L$(GMP_PATH) -lgmp
|
|
|
|
GSL_FLAGS = $(shell pkg-config --libs gsl)
|
|
|
|
CFLAGS := -Wall --debug $(GMP_FLAGS) $(GSL_FLAGS)
|
|
|
|
|
|
|
|
CCOMPILE = \
|
|
|
|
mkdir -p $(@D); \
|
|
|
|
$(CC) $(CFLAGS) $^ -o $@
|
|
|
|
|
2020-05-07 23:18:59 +02:00
|
|
|
ex-1: ex-1/bin/main ex-1/bin/pdf ex-1/bin/histo
|
2020-04-03 03:16:47 +02:00
|
|
|
ex-1/bin/main: ex-1/main.c ex-1/landau.c ex-1/tests.c ex-1/bootstrap.c
|
2020-03-24 02:17:39 +01:00
|
|
|
$(CCOMPILE)
|
|
|
|
ex-1/bin/pdf: ex-1/pdf.c
|
2020-03-06 02:24:32 +01:00
|
|
|
$(CCOMPILE)
|
2020-05-07 23:18:59 +02:00
|
|
|
ex-1/bin/histo: ex-1/histo.c
|
|
|
|
$(CCOMPILE)
|
2020-03-06 02:24:32 +01:00
|
|
|
|
2020-04-25 23:58:38 +02:00
|
|
|
ex-2: ex-2/bin/fancy ex-2/bin/fancier ex-2/bin/limit ex-2/bin/naive ex-2/bin/recip
|
2020-03-06 02:24:32 +01:00
|
|
|
ex-2/bin/%: ex-2/%.c
|
|
|
|
$(CCOMPILE)
|
|
|
|
|
2020-04-25 23:58:38 +02:00
|
|
|
ex-3: ex-3/bin/main
|
2020-03-06 11:54:28 +01:00
|
|
|
ex-3/bin/main: ex-3/main.c ex-3/common.c ex-3/likelihood.c ex-3/chisquared.c
|
2020-03-06 02:24:32 +01:00
|
|
|
$(CCOMPILE)
|
|
|
|
|
2020-04-25 23:58:38 +02:00
|
|
|
ex-4: ex-4/bin/main
|
2020-04-27 23:24:29 +02:00
|
|
|
ex-4/bin/main: ex-4/main.c ex-4/lib.c
|
2020-03-06 02:24:32 +01:00
|
|
|
$(CCOMPILE)
|
|
|
|
|
2020-04-30 22:28:06 +02:00
|
|
|
ex-5: ex-5/bin/main
|
2020-03-06 02:24:32 +01:00
|
|
|
ex-5/bin/%: ex-5/%.c
|
|
|
|
$(CCOMPILE)
|
|
|
|
|
2020-04-25 23:58:38 +02:00
|
|
|
ex-6: ex-6/bin/main
|
2020-05-11 00:13:51 +02:00
|
|
|
ex-6/bin/main: ex-6/main.c ex-6/common.c ex-6/rl.c ex-6/fft.c
|
|
|
|
$(CCOMPILE)
|
|
|
|
ex-6/bin/test: ex-6/test.c ex-6/common.c ex-6/rl.c ex-6/fft.c ex-6/dist.c
|
2020-03-06 02:24:32 +01:00
|
|
|
$(CCOMPILE)
|
|
|
|
|
2020-04-25 23:58:38 +02:00
|
|
|
ex-7: ex-7/bin/main ex-7/bin/test
|
2020-03-07 02:50:09 +01:00
|
|
|
ex-7/bin/main: ex-7/main.c ex-7/common.c ex-7/fisher.c ex-7/percep.c
|
2020-03-06 02:24:32 +01:00
|
|
|
$(CCOMPILE)
|
2020-03-07 18:48:52 +01:00
|
|
|
ex-7/bin/test: ex-7/test.c ex-7/common.c
|
|
|
|
$(CCOMPILE)
|
2020-03-06 02:24:32 +01:00
|
|
|
|
2020-04-25 23:58:38 +02:00
|
|
|
misc: misc/bin/pdfs
|
|
|
|
misc/bin/pdfs: misc/pdfs.c
|
2020-03-06 02:24:32 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf ex-*/bin
|