-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added a makefile target for building omc with RML profiling informa…
…tion git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5192 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
- Loading branch information
Showing
4 changed files
with
2,248 additions
and
2,729 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
# | ||
# Makefile for omc | ||
# | ||
# David Kågedal <x97davka@ida.liu.se> | ||
# | ||
# $Id$ | ||
# | ||
|
||
ANTLR_HOME = @antlrhome@ | ||
|
||
ANTLR_INCP = -I@antlrinc@ | ||
ANTLR_LIBP = -L@antlrlib@ | ||
LIBSOCKET = @LIBSOCKET@ | ||
|
||
SHELL = /bin/sh | ||
CC = gcc | ||
CFLAGS = $(USE_CORBA) | ||
RMLHOME = @rmlhome@ | ||
RMLINC = -I$(RMLHOME)/include/plain | ||
|
||
|
||
USE_CORBA = @USE_CORBA@ | ||
CORBAHOME = @CORBAHOME@ | ||
|
||
EXEEXT = @EXEEXT@ | ||
|
||
srcdir = .. | ||
top_builddir = ../.. | ||
builddir_bin=$(top_builddir)/build/bin | ||
builddir_lib=$(top_builddir)/build/lib | ||
builddir_inc=$(top_builddir)/build/include | ||
builddir_doc=$(top_builddir)/build/doc | ||
|
||
|
||
include $(srcdir)/Makefile.common | ||
|
||
CORBALIB=`mico-config --libs` | ||
|
||
ifdef USE_CORBA | ||
CORBALIBS=$(CORBALIB) | ||
else | ||
CORBALIBS= | ||
endif | ||
|
||
LDFLAGS = -lm -L$(RMLHOME)/lib/plain -lrml_p $(ANTLR_LIBP) -lantlr $(LIBSOCKET) $(CORBALIBS) -ldl -llpsolve55 | ||
|
||
ifdef QTHOME | ||
PLTPKGFLAGS = -L../../build/lib -lsendData -L$(QTHOME)/lib -lQtNetwork -lQtCore -lQtGui | ||
else | ||
PLTPKGFLAGS = -L../../build/lib -lsendData | ||
endif | ||
|
||
PROG = omcp | ||
RMLC = @rmlc_bin@ -p | ||
RML = $(RMLHOME)/bin/rml | ||
RMLCFLAGS = -Wr,-ftrace | ||
|
||
SUBDIRS = $(srcdir)/runtime $(srcdir)/absyn_builder $(srcdir)/modpar | ||
|
||
all : $(ALLMO) $(SRCSIGX) | ||
# Updated dependencies; reload make and compile the target | ||
$(MAKE) $(PROG) | ||
|
||
.SUFFIXES: | ||
.SUFFIXES: .o .mo .h .c | ||
.PHONY: all vctarget absyn_subdir clean reallyclean | ||
|
||
SRCHSRCDIR = $(SRCH:%.h=$(srcdir)/%.h) | ||
|
||
|
||
$(ALLMO): %.mo : $(srcdir)/%.mo | ||
cp $< $@ | ||
|
||
$(SRCO): %.o : %.c %.h | ||
$(RMLC) $(RMLCFLAGS) -c $< | ||
|
||
%.c %.h : %.mo | ||
$(RMLC) $(RMLCFLAGS) +C $< | ||
|
||
%.h : %.c | ||
|
||
$(SRCHSRCDIR) : $(srcdir)/%.h : %.h | ||
cp $< $@ | ||
|
||
$(SRCSIGX): %.sigx : %.mo | ||
$(srcdir)/rml2sig/rmldep-new.sh $< | ||
@touch $@ | ||
|
||
vctarget: $(SRCC) absyn_subdir | ||
|
||
absyn_subdir: | ||
(cd $(srcdir)/absyn_builder && $(MAKE) vctarget) | ||
|
||
$(PROG): $(SRCO) subdirs $(top_builddir)/c_runtime/sendData/*.cpp | ||
g++ -pg -O3 -o $(PROG)$(EXEEXT) $(SRCO) $(AST) $(RTOBJ) $(LDFLAGS) $(PLTPKGFLAGS) | ||
|
||
subdirs: $(SRCHSRCDIR) | ||
for dir in $(SUBDIRS); do $(MAKE) -C $$dir; done; | ||
|
||
clean: | ||
for d in $(SUBDIRS); do \ | ||
(cd $$d && $(MAKE) clean) \ | ||
done | ||
(cd $(srcdir) && $(RM) $(SRCH)) | ||
$(RM) -f $(SRCO) $(SRCC) $(SRCH) $(PROG)$(EXEEXT) *~ $(ALLMO:.mo=.srz) $(ALLMO:.mo=.sig) $(ALLMO:.mo=.sigx) | ||
|
||
reallyclean: clean | ||
$(RM) -f $(ALLMO) $(ALLMO:.mo=.sig) $(ALLMO:.mo=.sigx) $(ALLMO:.mo=.srz) $(PROG)$(EXEEXT) | ||
|
||
# don't remove these files after intermediate build steps | ||
.PRECIOUS: Makefile $(ALLMO) | ||
|
||
Makefile: Makefile.in | ||
$(top_builddir)/config.status Makefile | ||
|
||
|
||
## dependencies | ||
include $(srcdir)/.depend |
Oops, something went wrong.