source: GNUmakefile @ 981e22c

Revision 981e22c, 4.6 KB checked in by Hal Finkel <hfinkel@…>, 8 years ago (diff)

Upgrade to latest blosc library

blosc git: e394f327ccc78319d90a06af0b88bce07034b8dd

  • Property mode set to 100644
RevLine 
[da65757]1#                    Copyright (C) 2015, UChicago Argonne, LLC
2#                               All Rights Reserved
3#
4#                               Generic IO (ANL-15-066)
5#                     Hal Finkel, Argonne National Laboratory
6#
7#                              OPEN SOURCE LICENSE
8#
9# Under the terms of Contract No. DE-AC02-06CH11357 with UChicago Argonne,
10# LLC, the U.S. Government retains certain rights in this software.
11#
12# Redistribution and use in source and binary forms, with or without
13# modification, are permitted provided that the following conditions are met:
14#
15#   1. Redistributions of source code must retain the above copyright notice,
16#      this list of conditions and the following disclaimer.
17#
18#   2. Redistributions in binary form must reproduce the above copyright
19#      notice, this list of conditions and the following disclaimer in the
20#      documentation and/or other materials provided with the distribution.
21#
22#   3. Neither the names of UChicago Argonne, LLC or the Department of Energy
23#      nor the names of its contributors may be used to endorse or promote
24#      products derived from this software without specific prior written
25#      permission.
26#
27# *****************************************************************************
28#
29#                                  DISCLAIMER
30# THE SOFTWARE IS SUPPLIED “AS IS” WITHOUT WARRANTY OF ANY KIND.  NEITHER THE
31# UNTED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR
32# UCHICAGO ARGONNE, LLC, NOR ANY OF THEIR EMPLOYEES, MAKES ANY WARRANTY,
33# EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE
34# ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY INFORMATION, DATA, APPARATUS,
35# PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE
36# PRIVATELY OWNED RIGHTS.
37#
38# *****************************************************************************
39
[00587dc]40CC = gcc
41CXX = g++
42
43MPICC = mpicc
44MPICXX = mpicxx
45
46all: fe-progs mpi-progs
47sql: fe-sqlite
48
49FEDIR = frontend
50FE_CFLAGS := -g -fPIC -O3 -fopenmp
51FE_CPPFLAGS := -Ithirdparty/blosc -Ithirdparty/sqlite -DGENERICIO_NO_MPI
52
53MPIDIR = mpi
[754e14c]54MPI_CFLAGS := -g -O3 -fopenmp
[00587dc]55MPI_CPPFLAGS := -Ithirdparty/blosc
56
57$(FEDIR):
58        mkdir -p $(FEDIR)
59
60$(FEDIR)/%.o: thirdparty/blosc/%.c | $(FEDIR)
61        $(CC) $(FE_CFLAGS) $(FE_CPPFLAGS) -c -o $@ $<
62
63$(FEDIR)/%.o: %.cxx | $(FEDIR)
64        $(CXX) $(FE_CFLAGS) $(FE_CPPFLAGS) -c -o $@ $<
65
[981e22c]66FE_BLOSC_O := $(FEDIR)/blosc.o $(FEDIR)/blosclz.o $(FEDIR)/shuffle.o $(FEDIR)/bitshuffle-generic.o $(FEDIR)/shuffle-generic.o
67
68$(FEDIR)/GenericIOPrint: $(FEDIR)/GenericIOPrint.o $(FEDIR)/GenericIO.o $(FE_BLOSC_O)
[00587dc]69        $(CXX) $(FE_CFLAGS) -o $@ $^
70
[981e22c]71$(FEDIR)/GenericIOVerify: $(FEDIR)/GenericIOVerify.o $(FEDIR)/GenericIO.o $(FE_BLOSC_O)
[00587dc]72        $(CXX) $(FE_CFLAGS) -o $@ $^
73
74FE_UNAME := $(shell uname -s)
75ifeq ($(FE_UNAME),Darwin)
76FE_SHARED := -bundle
77else
78FE_SHARED := -shared
79endif
80$(FEDIR)/GenericIOSQLite.so: $(FEDIR)/GenericIOSQLite.o $(FEDIR)/GenericIO.o
81        $(CXX) $(FE_CFLAGS) $(FE_SHARED) -o $@ $^
82
83SQLITE_CPPFLAGS := -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_ENABLE_LOAD_EXTENSION=1 -DHAVE_READLINE=1
84
85$(FEDIR)/sqbuild:
86        mkdir -p $(FEDIR)/sqbuild
87
88$(FEDIR)/sqbuild/%.o: thirdparty/sqlite/%.c | $(FEDIR)/sqbuild
89        $(CC) $(FE_CFLAGS) $(FE_CPPFLAGS) $(SQLITE_CPPFLAGS) -c -o $@ $<
90
91$(FEDIR)/sqlite3: $(FEDIR)/sqbuild/sqlite3.o $(FEDIR)/sqbuild/shell.o
92        $(CC) $(FE_CFLAGS) -o $@ $^ -pthread -lreadline -lrt -ldl
93
94$(MPIDIR):
95        mkdir -p $(MPIDIR)
96
97$(MPIDIR)/%.o: thirdparty/blosc/%.c | $(MPIDIR)
98        $(MPICC) $(MPI_CFLAGS) $(MPI_CPPFLAGS) -c -o $@ $<
99
100$(MPIDIR)/%.o: %.cxx | $(MPIDIR)
101        $(MPICXX) $(MPI_CFLAGS) $(MPI_CPPFLAGS) -c -o $@ $<
102
[981e22c]103MPI_BLOSC_O := $(MPIDIR)/blosc.o $(MPIDIR)/blosclz.o $(MPIDIR)/shuffle.o $(MPIDIR)/bitshuffle-generic.o $(MPIDIR)/shuffle-generic.o
104
105$(MPIDIR)/GenericIOPrint: $(MPIDIR)/GenericIOPrint.o $(MPIDIR)/GenericIO.o $(MPI_BLOSC_O)
[00587dc]106        $(MPICXX) $(MPI_CFLAGS) -o $@ $^
107
[981e22c]108$(MPIDIR)/GenericIOVerify: $(MPIDIR)/GenericIOVerify.o $(MPIDIR)/GenericIO.o $(MPI_BLOSC_O)
[00587dc]109        $(MPICXX) $(MPI_CFLAGS) -o $@ $^
110
[981e22c]111$(MPIDIR)/GenericIOBenchmarkRead: $(MPIDIR)/GenericIOBenchmarkRead.o $(MPIDIR)/GenericIO.o $(MPI_BLOSC_O)
[406b50a]112        $(MPICXX) $(MPI_CFLAGS) -o $@ $^
113
[981e22c]114$(MPIDIR)/GenericIOBenchmarkWrite: $(MPIDIR)/GenericIOBenchmarkWrite.o $(MPIDIR)/GenericIO.o $(MPI_BLOSC_O)
[406b50a]115        $(MPICXX) $(MPI_CFLAGS) -o $@ $^
116
[00587dc]117frontend-progs: $(FEDIR)/GenericIOPrint $(FEDIR)/GenericIOVerify
118fe-progs: frontend-progs
119
[406b50a]120mpi-progs: $(MPIDIR)/GenericIOPrint $(MPIDIR)/GenericIOVerify $(MPIDIR)/GenericIOBenchmarkRead $(MPIDIR)/GenericIOBenchmarkWrite
[00587dc]121
122frontend-sqlite: $(FEDIR)/GenericIOSQLite.so $(FEDIR)/sqlite3
123fe-sqlite: frontend-sqlite
124
125clean:
126        rm -rf frontend mpi
127
Note: See TracBrowser for help on using the repository browser.