Skip to content

Commit

Permalink
Updated classdesc ref (includes guard macro change)
Browse files Browse the repository at this point in the history
Fix up builds to prevent double building.
  • Loading branch information
highperformancecoder committed Sep 12, 2024
1 parent 85b48f0 commit bf96739
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MCFG=include/Makefile.config

ifneq ($(MAKECMDGOALS),clean)
# make sure Classdesc is built first, even before starting to include Makefiles
build_classdesc:=$(shell if [ ! -x bin/classdesc ]; then cd classdesc; $(MAKE) PREFIX=$(ECOLAB_HOME) XDR=$(XDR) install; fi)
build_classdesc:=$(shell if [ ! -x bin/classdesc ]; then cd classdesc; $(MAKE) XDR=$(XDR); fi)
endif

include include/Makefile
Expand Down Expand Up @@ -185,16 +185,14 @@ lib:
bin:
-mkdir -p bin


lib/libecolab$(ECOLIBS_EXT).a: $(OBJS) $(LIBMODS)
lib/libecolab$(ECOLIBS_EXT).a: $(OBJS) $(LIBMODS) graphcode
# build graphcode objects
-cd graphcode; $(GRAPHCODE_MAKE) libgraphcode.a
-cp -f graphcode/*.h include
ar r $@ $^ graphcode/*.o
ar r $@ $(OBJS) $(LIBMODS) graphcode/*.o
ifeq ($(OS),Darwin)
ranlib $@
endif
$(CPLUSPLUS) -shared -Wl,-soname,libecolab$(ECOLIBS_EXT).so.$(SOVERSION) $^ graphcode/*.o $(LIBS) -o lib/libecolab$(ECOLIBS_EXT).so.$(SOVERSION)
$(CPLUSPLUS) -shared -Wl,-soname,libecolab$(ECOLIBS_EXT).so.$(SOVERSION) $(OBJS) $(LIBMODS) graphcode/*.o $(LIBS) -o lib/libecolab$(ECOLIBS_EXT).so.$(SOVERSION)
cd lib; ln -sf libecolab$(ECOLIBS_EXT).so.$(SOVERSION) libecolab$(ECOLIBS_EXT).so
cd lib; ln -sf libecolab$(ECOLIBS_EXT).so.$(SOVERSION) ecolab$(ECOLIBS_EXT).so

Expand Down Expand Up @@ -268,6 +266,8 @@ install: all-without-models
if [ -f $(PREFIX)/include/version.h ] && ! diff -q $(PREFIX)/include/version.h include/version.h; then rm -rf $(PREFIX); fi
mkdir -p $(PREFIX)
cp -r include $(PREFIX)
cp classdesc/*.{h,cd} $(PREFIX)/include
cp graphcode/*.{h,cd} $(PREFIX)/include
# ensure cd files are more up-to-date than their sources.
touch $(PREFIX)/include/*.cd
# fix up unpack_base.h
Expand Down
2 changes: 1 addition & 1 deletion include/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ ECOLIBS=$(ECOLAB_HOME)/lib/libecolab$(ECOLIBS_EXT).a

# why is boost_thread required here?
LIBS+=-L$(ECOLAB_HOME)/lib -lecolab$(ECOLIBS_EXT) -lboost_thread
FLAGS+=-I. -I$(ECOLAB_HOME)/include -DHASH_TCL_hash
FLAGS+=-I. -I$(ECOLAB_HOME)/classdesc -I$(ECOLAB_HOME)/include -DHASH_TCL_hash

# The following section uses GNU Make specific syntax. If not using
# GNU Make, edit the FLAGS, LIBS, CC,
Expand Down
1 change: 1 addition & 0 deletions include/ecolab_epilogue.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ Put this after including all .cd files
*/
#include "classdesc_epilogue.h"
#ifdef GRAPHCODE_H
#include "graphcode.cd"
#endif

0 comments on commit bf96739

Please sign in to comment.