Skip to content

Commit 0aa62a2

Browse files
committed
Copy up libcdf.so for downstream projects
1 parent 95dc7ff commit 0aa62a2

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

buildfiles/Linux.mak

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ LOC_CSPICE_URL:=https://naif.jpl.nasa.gov/pub/naif/toolkit//C/PC_Linux_GCC_64bit
1919
ifeq ($(BLD_CDF),1)
2020
CDF_INC:=$(BD)/$(LOC_CDF_DIST)/src/include
2121
CDF_LIB:=$(BD)/$(LOC_CDF_DIST)/src/lib/libcdf.a
22+
CDF_SO:=$(BD)/$(LOC_CDF_DIST)/src/lib/libcdf.so
23+
CDF_SO_REDIST:=$(BD)/libcdf.so
2224
endif
2325

2426
ifeq ($(BLD_CSPICE),1)
@@ -30,7 +32,7 @@ endif
3032
##############################################################################
3133
# Project definitions
3234

33-
TARG=libdas
35+
TARG=libdas3
3436

3537
SRCS:=das1.c array.c buffer.c builder.c cli.c codec.c credentials.c dataset.c \
3638
dataset_hdr2.c dataset_hdr3.c datum.c descriptor.c dft.c dimension.c dsdf.c \
@@ -231,18 +233,21 @@ $(BD)/das3_cdf:utilities/das3_cdf.c $(BD)/$(TARG).a
231233

232234
# Conditional rule
233235
ifeq ($(BLD_CSPICE)$(BLD_CDF),11)
234-
build_dep:$(CSPICE_LIB) $(CDF_LIB)
236+
build_dep:$(CSPICE_LIB) $(CDF_LIB) $(CDF_SO_REDIST)
235237
else ifeq ($(BLD_CSPICE)$(BLD_CDF),10)
236-
build_dep:$(CSPICE_LIB) $(CDF_LIB)
238+
build_dep:$(CSPICE_LIB)
237239
else ifeq ($(BLD_CSPICE)$(BLD_CDF),01)
238-
build_dep:$(CSPICE_LIB) $(CDF_LIB)
240+
build_dep:$(CDF_LIB) $(CDF_SO)
239241
else
240242
build_dep:
241243
endif
242244

243245
$(CSPICE_LIB): $(BD)/cspice.tar
244246
cd $(BD) && tar -mxvf cspice.tar
245247

248+
$(CDF_SO_REDIST):$(CDF_SO)
249+
cp $< $@
250+
246251
$(BD)/cspice.tar: | $(BD)
247252
curl $(LOC_CSPICE_URL) > $(BD)/cspice.tar.Z
248253
uncompress $(BD)/cspice.tar.Z
@@ -315,10 +320,16 @@ test_spice:$(BD) $(BD)/$(TARG).a $(BUILD_TEST_PROGS) $(BULID_UTIL_PROGS)
315320
@$(BD)/TestSpice
316321

317322

318-
# Install everything
323+
# Extra install if CDF lib included, downstream projects may
324+
# need the same cdflib used by das2.
325+
ifeq ($(BLD_CDF),1)
326+
install:lib_install install_cdf $(INST_UTIL_PROGS)
327+
else
319328
install:lib_install $(INST_UTIL_PROGS)
329+
endif
320330

321-
install_cdf:$(DESTDIR)$(INST_NAT_BIN)/das3_cdf
331+
# Install everything
332+
install_cdf:$(DESTDIR)$(INST_NAT_BIN)/das3_cdf $(DESTDIR)$(INST_NAT_LIB)/libcdf.so
322333

323334
lib_install:$(DESTDIR)$(INST_NAT_LIB)/$(TARG).a $(DESTDIR)$(INST_NAT_LIB)/$(TARG).so $(INST_HDRS)
324335

0 commit comments

Comments
 (0)