-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile.icc
38 lines (27 loc) · 1.47 KB
/
Makefile.icc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
CC=icc
CFLAGS=-std=c99 -Wall -O3 -Wno-unused -qopt-report=4 -qopt-report-file=icc-opt.txt
CFLAGS_ZC=-I$(ZC_INSTALL_DIR)/include
LDFLAGS=-lm -lfftw3 -lfftw3f -lz -lpthread
LDFLAGS_EXTRA = -lnetcdf
LDFLAGS_ZC=-L$(ZC_INSTALL_DIR)/lib -lzc
.SECONDEXPANSION:
%.o: $$(basename $$*).c
$(CC) $(CFLAGS) $(INCFOLDER) $(DEFINES) -c $< -o $@
dctz-ec-test: dctz-test.c dctz-comp-lib.c dctz-decomp-lib.c binning.c util.c dct.c dctz-comp-lib-float.c dct-float.c dctz-decomp-lib-float.c
$(CC) $(CFLAGS) $(CFLAGS_ZC) $^ -o $@ $(LDFLAGS) -DUSE_TRUNCATE
dctz-qt-test: dctz-test.c dctz-comp-lib.c dctz-decomp-lib.c binning.c util.c dct.c dctz-comp-lib-float.c dct-float.c dctz-decomp-lib-float.c
$(CC) $(CFLAGS) $(CFLAGS_ZC) $^ -o $@ $(LDFLAGS) -DUSE_TRUNCATE -DUSE_QTABLE
dctz-ec-zc-test: dctz-test.c dctz-comp-lib.c dctz-decomp-lib.c binning.c util.c dct.c dctz-comp-lib-float.c dct-float.c dctz-decomp-lib-float.c
$(CC) $(CFLAGS) $(CFLAGS_ZC) $^ -o $@ $(LDFLAGS) $(LDFLAGS_ZC) -DUSE_TRUNCATE -DWITH_Z_CHECKER
dctz-qt-zc-test: dctz-test.c dctz-comp-lib.c dctz-decomp-lib.c binning.c util.c dct.c dctz-comp-lib-float.c dct-float.c dctz-decomp-lib-float.c
$(CC) $(CFLAGS) $(CFLAGS_ZC) $^ -o $@ $(LDFLAGS) $(LDFLAGS_ZC) -DUSE_TRUNCATE -DUSE_QTABLE -DWITH_Z_CHECKER
.PHONY: all
.DEFAULT_GOAL:=all
all:
ifeq ($(ZC_INSTALL_DIR),)
all: dctz-ec-test dctz-qt-test
else
all: dctz-ec-test dctz-qt-test dctz-ec-zc-test dctz-qt-zc-test
endif
clean:
rm -f *~ *.o dctz-ec-test dctz-qt-test dctz-ec-zc-test dctz-qt-zc-test