Skip to content

Commit

Permalink
Install antlr3 includes. Fix OMNotebook linking
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25888 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed May 3, 2015
1 parent 556609d commit da50f02
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Makefile.common
Expand Up @@ -17,7 +17,7 @@ builddir_locale=$(top_builddir)/build/share/locale/
INSTALL_APPDIR = ${DESTDIR}/Applications/MacPorts/
INSTALL_BINDIR = ${DESTDIR}${bindir}
INSTALL_LIBDIR = ${DESTDIR}${libdir}/
INSTALL_INCLUDEDIR = ${DESTDIR}${includedir}/omc
INSTALL_INCLUDEDIR = ${DESTDIR}${includedir}
INSTALL_DATADIR = ${DESTDIR}${datadir}
INSTALL_DOCDIR = ${DESTDIR}${docdir}
INSTALL_SHAREDIR = ${DESTDIR}${datadir}/
Expand Down Expand Up @@ -374,7 +374,8 @@ install-dirs:
if [ "$(APP)" = ".app" ]; then mkdir -p ${INSTALL_APPDIR}; fi
mkdir -p ${INSTALL_BINDIR}
mkdir -p ${INSTALL_LIBDIR}
mkdir -p ${INSTALL_INCLUDEDIR}
mkdir -p ${INSTALL_INCLUDEDIR}/omc
mkdir -p ${INSTALL_INCLUDEDIR}/$(host_short)/antlr3
mkdir -p ${INSTALL_DOCDIR}/omc/testmodels
mkdir -p ${INSTALL_MANDIR}/man1/
mkdir -p ${INSTALL_LOCALEDIR}
Expand All @@ -392,7 +393,8 @@ install: install-dirs
# Libraries
cp -a ./${builddir_lib}/* ${INSTALL_LIBDIR}
# Includes
cp -a ./${builddir_inc}/* ${INSTALL_INCLUDEDIR}
cp -a ./${builddir_inc}/* ${INSTALL_INCLUDEDIR}/omc
cp -a ./${builddir_inc}/$(host_short)/antlr3 ${INSTALL_INCLUDEDIR}/$(host_short)/antlr3
# License
cp -p COPYING ${INSTALL_DOCDIR}/omc/
# Documents
Expand Down
4 changes: 3 additions & 1 deletion Parser/Makefile.common
Expand Up @@ -12,6 +12,8 @@ BUILDINC = -I../Compiler/runtime -I../SimulationRuntime/c/meta -I../SimulationRu
all: install

install: $(ANTLR_LIB) libomparse.a
mkdir -p ../build/include/$(host_short)/omc/antlr3
cp $(ANTLR)/include/*.h ../build/include/$(host_short)/omc/antlr3
cp $(ANTLR_LIB) libomparse.a ../build/$(LIB_OMC)/

$(ANTLR)/antlr3config.h: $(ANTLR)/antlr3config.h.in $(ANTLR)/configure
Expand All @@ -25,7 +27,7 @@ libomantlr3.a: $(ANTLR)/src/*.c $(ANTLR)/include/*.h $(ANTLR)/antlr3config.h
rm -f antlr3*.o
libomantlr3$(SHREXT): $(ANTLR)/src/*.c $(ANTLR)/include/*.h $(ANTLR)/antlr3config.h
# build the library
$(CC) -shared -o $@ ${CFLAGS} ${CPPFLAGS} $(ANTLR)/src/*.c -I$(ANTLR)/include -I$(ANTLR)
$(CC) -shared -o $@ ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} $(ANTLR)/src/*.c -I$(ANTLR)/include -I$(ANTLR)
test ! `uname` = Darwin || install_name_tool -id "@rpath/$@" $@

HFILES = \
Expand Down
2 changes: 2 additions & 0 deletions Parser/Makefile.in
Expand Up @@ -11,9 +11,11 @@ ifeq (arm,@target_cpu@)
ANTLRDEBUG=--disable-antlrdebug --disable-abiflags
endif
host=--host=@host@
host_short=@host_short@
LIB_OMC=lib/@host_short@/omc
ANTLR_LIB=libomantlr3@SHREXT@
include Makefile.common
LDFLAGS=@RPATH@

Makefile: Makefile.in
(cd ..; ./config.status)

0 comments on commit da50f02

Please sign in to comment.