Skip to content

Commit 80fe8fa

Browse files
authored
Merge pull request #56 from swt2c/unbundled-cctbx
Enable building against unbundled cctbx library
2 parents 74576fa + 9b70c07 commit 80fe8fa

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

Fox/gnu.mak

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ shared-wxgtk=1
88
shared-fftw=1
99
shared-glut=1
1010
shared-mysql=1
11+
shared-cctbx=1
1112
endif
1213

1314
all: Fox
1415

1516
default: all
1617

1718
Fox:
18-
$(MAKE) -f gnu.mak wxcryst=1 opengl=1 fftw=1 debug=$(debug) unicode=$(unicode) cod=$(cod) shared=$(shared) shared-wxgtk=$(shared-wxgtk) shared-glut=$(shared-glut) shared-newmat=$(shared-newmat) shared-fftw=$(shared-fftw) shared-mysql=$(shared-mysql) -C src Fox
19+
$(MAKE) -f gnu.mak wxcryst=1 opengl=1 fftw=1 debug=$(debug) unicode=$(unicode) cod=$(cod) shared=$(shared) shared-wxgtk=$(shared-wxgtk) shared-glut=$(shared-glut) shared-newmat=$(shared-newmat) shared-fftw=$(shared-fftw) shared-mysql=$(shared-mysql) shared-cctbx=$(shared-cctbx) -C src Fox
1920

2021
Fox-nogui:
2122
$(MAKE) -f gnu.mak wxcryst=0 opengl=0 fftw=0 cod=0 debug=$(debug) -C src Fox-nogui

Fox/src/gnu.mak

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ else
1515
endif
1616

1717
ifeq ($(profile),2)
18-
%.o : %.cpp $(libwx) $(libnewmat) libcctbx
18+
%.o : %.cpp $(libwx) $(libnewmat) $(libcctbx)
1919
@rm -f $(*F).gcda $(*F).gcno
2020
@$(MAKEDEPEND)
2121
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
@@ -33,11 +33,11 @@ endif
3333
libFox: $(OBJ)
3434

3535
#Main Application
36-
Fox: $(libwx) $(libnewmat) $(libfftw) $(COD_LIB) libCrystVector libQuirks libRefinableObj libcctbx libCryst libwxCryst
36+
Fox: $(libwx) $(libnewmat) $(libfftw) $(COD_LIB) libCrystVector libQuirks libRefinableObj $(libcctbx) libCryst libwxCryst
3737
$(MAKE) -f gnu.mak libFox
3838
${LINKER} ${CRYST_LDFLAGS} -o $@ ${filter-out %.h %.a %.so lib%, $^} $(OBJ) ${LOADLIBES}
3939

40-
Fox-nogui: $(libnewmat) libcctbx libCrystVector libQuirks libRefinableObj libCryst Fox.o
40+
Fox-nogui: $(libnewmat) $(libcctbx) libCrystVector libQuirks libRefinableObj libCryst Fox.o
4141
${LINKER} ${CRYST_LDFLAGS} -o $@ ${filter-out %.h %.a %.so lib%, $^} ${LOADLIBES}
4242

4343
fox: Fox

ObjCryst/rules-gnu.mak

+9-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ shared-newmat=1
2424
shared-wxgtk=1
2525
shared-fftw=1
2626
shared-glut=1
27+
shared-cctbx=1
2728
endif
2829
### Rules for Linux & GCC
2930
# C compiler
@@ -237,7 +238,11 @@ $(DIR_STATIC_LIBS)/lib/libcctbx.a: $(BUILD_DIR)/cctbx.tar.bz2
237238
#ln -sf $(BUILD_DIR)/boost $(DIR_STATIC_LIBS)/include/
238239
#rm -Rf $(BUILD_DIR)/cctbx
239240

240-
libcctbx: $(DIR_STATIC_LIBS)/lib/libcctbx.a
241+
ifneq ($(shared-cctbx),1)
242+
libcctbx= $(DIR_STATIC_LIBS)/lib/libcctbx.a
243+
else
244+
libcctbx=
245+
endif
241246

242247
$(BUILD_DIR)/fftw-3.3.10.tar.gz:
243248
cd $(BUILD_DIR) && $(DOWNLOAD_COMMAND) http://fftw.org/fftw-3.3.10.tar.gz
@@ -268,13 +273,13 @@ libboost:$(BUILD_DIR)/boost_1_68_0.tar.bz2
268273
rm -Rf $(BUILD_DIR)/boost_1_68_0
269274

270275
#ObjCryst++
271-
libCryst: $(libwx) libcctbx
276+
libCryst: $(libwx) $(libcctbx)
272277
$(MAKE) -f gnu.mak -C ${DIR_LIBCRYST} lib
273278

274279
libcryst: libCryst
275280

276281
#wxCryst++
277-
libwxCryst: $(libwx) $(libfreeglut) $(libfftw) libcctbx
282+
libwxCryst: $(libwx) $(libfreeglut) $(libfftw) $(libcctbx)
278283
$(MAKE) -f gnu.mak -C ${DIR_WXWCRYST} lib
279284

280285
#Vector computation library
@@ -286,5 +291,5 @@ libQuirks: $(libwx)
286291
$(MAKE) -f gnu.mak -C ${DIR_VFNQUIRKS} lib
287292

288293
#Library to take care of refinable parameters, plus Global optimization and Least Squares refinements
289-
libRefinableObj:$(libnewmat) $(libwx) libcctbx
294+
libRefinableObj:$(libnewmat) $(libwx) $(libcctbx)
290295
$(MAKE) -f gnu.mak -C ${DIR_REFOBJ}/ lib

0 commit comments

Comments
 (0)