3 CFLAGS
= -Wall
-pipe
-march
=core2
-mtune
=generic
-pedantic
-Wfloat-equal\
4 # -Wno-packed-bitfield-compat\
6 # -DMKL_ILP64 -m64 -I$(MKLROOT)/include \
7 # -ftree-vectorize -ftree-vectorizer-verbose=5
8 LDFLAGS
= -lz
-lm
-Wl
,-O1
-Wl
,--as-needed
-Wl
,--sort-common
-Wl
,--enable-new-dtags
-Wl
,--hash-style
=both \
9 # $(MKLROOT)/lib/em64t/libmkl_solver_ilp64_sequential.a -Wl,--start-group $(MKLROOT)/lib/em64t/libmkl_intel_ilp64.a $(MKLROOT)/lib/em64t/libmkl_sequential.a $(MKLROOT)/lib/em64t/libmkl_core.a -Wl,--end-group -lpthread
17 MAKEARG
= $(CFLAGS
) $(DEF
) $(OPT
) $(ASMO
)
21 override CFLAGS
:= $(CFLAGS
) -fopenmp
22 override DEF
:= $(DEF
) -D OPENMP
27 override LDFLAGS
:= $(LDFLAGS
) -lpthread
28 override DEF
:= $(DEF
) -D PTHREAD
32 customobjects
= $(addprefix $(OBJDIR
),)# sdleftTFuint16.o sdleftTFuint32.o sdleftTFuint64.o sdleftTFpublic.o )
33 c99objects
= $(addprefix $(OBJDIR
), prb.o
)
34 noshareobjects
= $(addprefix $(OBJDIR
), prbtest.o main.o simple.o prb-tree.o prb-test.o
)
35 objects
= $(cobjects
) $(c99objects
) $(customobjects
)
36 exefiles
= prb-test readsdedump simplededump
38 all: clean $(objects
) $(exefiles
) stat_dup
39 @echo
[$(CC
) $(CFLAGS
) $(OPT
) $(LDFLAGS
)][$(MAKEARG
)].
41 readsdedump
: $(objects
) $(noshareobjects
)
42 @
$(CC
) $(CFLAGS
) $(OPT
) $(LDFLAGS
) -o readsdedump
$(objects
) $(addprefix $(OBJDIR
), prb-tree.o main.o
)
43 simplededump
: $(objects
) $(noshareobjects
)
44 @
$(CC
) $(CFLAGS
) $(OPT
) $(LDFLAGS
) -o simplededump
$(objects
) $(addprefix $(OBJDIR
), simple.o
)
45 prb-test
: $(objects
) $(noshareobjects
)
46 @
$(CC
) $(CFLAGS
) $(OPT
) $(LDFLAGS
) -o prb-test
$(objects
) $(addprefix $(OBJDIR
), prb-test.o prbtest.o
)
48 g
++ $(CFLAGS
) $(OPT
) $(LDFLAGS
) -o stat_dup
-I. duplication.
cpp gzstream.C
-lz
50 $(cobjects
): $(OBJDIR
)%.o
: %.c
51 @
$(CC
) $(MAKEARG
) -c
$< -o
$@
> $(@
:.o
=.asm
)
52 #$(cppobjects): %.o: %.cpp
53 # $(CPP) $(MAKEARG) -c $< -o $@ > $@.asm
54 $(c99objects
) $(noshareobjects
): $(OBJDIR
)%.o
: %.c
55 @
$(CC
) -std
=gnu99
$(MAKEARG
) -c
$< -o
$@
> $(@
:.o
=.asm
)
57 debug
: override MAKEARG
:= $(CFLAGS
) $(DEF
) -O
-D DEBUG
-g
$(ASMO
)
60 alpha
: override MAKEARG
:= $(CFLAGS
) $(DEF
) $(OPT
) $(ASMO
) -D TEST
63 alphadbg
: override MAKEARG
:= $(CFLAGS
) $(DEF
) $(OPT
) $(ASMO
) -D TEST
-D DEBUG
-g
66 alphapf
: override MAKEARG
:= $(CFLAGS
) $(DEF
) $(OPT
) $(ASMO
) -D TEST
-pg
-g
67 alphapf
: override LDFLAGS
+= -pg
70 gprofmain
: clean readscorr
71 .
/readscorr
-o gprof
test.lst
2> gprof.log
72 gprof
-l readscorr
> gprof.report
75 valgrind
--leak-check
=yes .
/readscorr
test.lst
-k
17
79 -rm $(exefiles
) $(noshareobjects
) $(objects
)