Skip to content

Commit

Permalink
- update to makefiles
Browse files Browse the repository at this point in the history
  + got rid of $OSTYPE (as we already have different makefiles for MinGW and Linux)
  + added -ftrace for Linux for easier testing
  + updated the Qt libs for Linux

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@3711 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Oct 25, 2008
1 parent 5941a31 commit aff4342
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 36 deletions.
20 changes: 7 additions & 13 deletions Compiler/omc_debug/Makefile.in
@@ -1,7 +1,7 @@
#
# Makefile for omc
#
# David K�gedal <x97davka@ida.liu.se>
# David Kågedal <x97davka@ida.liu.se>
#
# $Id$
#
Expand All @@ -10,8 +10,6 @@ ANTLR_HOME = @antlrhome@

ANTLR_INCP = -I@antlrinc@
ANTLR_LIBP = -L@antlrlib@
OSTYP=$(OSTYPE)
OS_MSYS=msys
LIBSOCKET = @LIBSOCKET@

SHELL = /bin/sh
Expand All @@ -36,12 +34,7 @@ builddir_doc=$(top_builddir)/build/doc

include $(srcdir)/Makefile.common

ifeq ($(OSTYP),$(OS_MSYS))
LIBSOCKET=
CORBALIB=-L$(CORBAHOME)/lib -lmico -lwsock32
else
CORBALIB=`mico-config --libs`
endif
CORBALIB=`mico-config --libs`

ifdef USE_CORBA
CORBALIBS=$(CORBALIB)
Expand All @@ -52,14 +45,15 @@ endif
LDFLAGS = -lm -L$(RMLHOME)/lib/plain -lrml_g $(ANTLR_LIBP) -lantlr $(LIBSOCKET) $(CORBALIBS) -ldl

ifdef QTHOME
PLTPKGFLAGS = -L../../build/lib -lsendData -L$(QTHOME)/lib -lqtmain -lQtNetwork4 -lQtCore4 -lQtGui4
PLTPKGFLAGS = -L../../build/lib -lsendData -L$(QTHOME)/lib -lQtNetwork -lQtCore -lQtGui
else
PLTPKGFLAGS = -L../../build/lib -lsendData
endif

PROG = omcd
RMLC = @rmlc_bin@ -g -Wc,-O3 #-Wr,-East,-Ecps,-Efol
RML = $(RMLHOME)/bin/rml
RMLCFLAGS = -Wr,-ftrace

SUBDIRS = $(srcdir)/runtime $(srcdir)/absyn_builder $(srcdir)/modpar

Expand All @@ -76,16 +70,16 @@ $(ALLMO): %.mo : $(srcdir)/%.mo
cp $< $@

$(SRCO): %.o : %.c %.h
$(RMLC) -c $<
$(RMLC) $(RMLCFLAGS) -c $<

$(SRCC): %.c : %.mo
$(RMLC) +C $<
$(RMLC) $(RMLCFLAGS) +C $<

$(SRCHSRCDIR) : $(srcdir)/%.h : %.h
cp $< $@

$(SRCH): %.h : %.mo
$(RMLC) -c $<
$(RMLC) $(RMLCFLAGS) -c $<

$(SRCSIG): %.sig : %.mo
$(srcdir)/rml2sig/rmldep-new.sh $<
Expand Down
21 changes: 7 additions & 14 deletions Compiler/omc_release/Makefile.in
Expand Up @@ -10,8 +10,6 @@ ANTLR_HOME = @antlrhome@

ANTLR_INCP = -I@antlrinc@
ANTLR_LIBP = -L@antlrlib@
OSTYP=$(OSTYPE)
OS_MSYS=msys
LIBSOCKET = @LIBSOCKET@

USE_CORBA = @USE_CORBA@
Expand All @@ -33,13 +31,7 @@ builddir_inc=$(top_builddir)/build/include
builddir_doc=$(top_builddir)/build/doc
include $(srcdir)/Makefile.common


ifeq ($(OSTYP),$(OS_MSYS))
LIBSOCKET=
CORBALIB=-L$(CORBAHOME)/lib -lmico -lwsock32
else
CORBALIB=`mico-config --libs`
endif
CORBALIB=`mico-config --libs`

ifdef USE_CORBA
CORBALIBS=$(CORBALIB)
Expand All @@ -50,14 +42,15 @@ endif
LDFLAGS = -lm -L$(RMLHOME)/lib/plain -lrml $(ANTLR_LIBP) -lantlr $(LIBSOCKET) $(CORBALIBS) -ldl

ifdef QTHOME
PLTPKGFLAGS = -L../../build/lib -lsendData -L$(QTHOME)/lib -lqtmain -lQtNetwork4 -lQtCore4 -lQtGui4
PLTPKGFLAGS = -L../../build/lib -lsendData -L$(QTHOME)/lib -lQtNetwork -lQtCore -lQtGui
else
PLTPKGFLAGS = -L../../build/lib -lsendData
endif

PROG = omc
RMLC = @rmlc_bin@
RML = $(RMLHOME)/bin/rml
RMLCFLAGS = -Wr,-ftrace



Expand All @@ -77,16 +70,16 @@ $(ALLMO): %.mo : $(srcdir)/%.mo
cp $< $@

$(SRCO): %.o : %.c %.h
$(RMLC) -c $<
$(RMLC) $(RMLCFLAGS) -c $<

$(SRCC): %.c : %.mo
$(RMLC) +C $<
$(RMLC) $(RMLCFLAGS) +C $<

$(SRCHSRCDIR) : $(srcdir)/%.h : %.h
cp $< $@

$(SRCH): %.h : %.mo
$(RMLC) -c $<
$(RMLC) $(RMLCFLAGS) -c $<

$(SRCSIG): %.sig : %.mo
$(srcdir)/rml2sig/rmldep-new.sh $<
Expand All @@ -98,7 +91,7 @@ absyn_subdir:
(cd $(srcdir)/absyn_builder && $(MAKE) vctarget)

$(PROG): $(SRCO) $(AST) $(RTOBJ)
g++ -o $(PROG)$(EXEEXT) $(SRCO) $(AST) $(RTOBJ) $(LDFLAGS) $(PLTPKGFLAGS)
g++ -O3 -o $(PROG)$(EXEEXT) $(SRCO) $(AST) $(RTOBJ) $(LDFLAGS) $(PLTPKGFLAGS)

subdirs: $(SRCHSRCDIR) $(SUBDIRS)

Expand Down
10 changes: 1 addition & 9 deletions Compiler/runtime/Makefile.in
Expand Up @@ -17,15 +17,7 @@ USE_CORBA = @USE_CORBA@
CORBAHOME = @CORBAHOME@

RMLINCLUDE = @rmlinc@
OSTYP = $(OSTYPE)
OS_MSYS=msys
ifeq ($(OSTYP),$(OS_MSYS))
CFLAGS = @DEFS@ $(USE_CORBA) -DBUILD_MICO_DLL
else
CFLAGS = @DEFS@ $(USE_CORBA) -DCYGWIN
endif


CFLAGS = @DEFS@ $(USE_CORBA)

ifdef USE_CORBA
CORBASRC = omc_communication.cc omc_communication_impl.cpp corbaimpl.cpp
Expand Down

0 comments on commit aff4342

Please sign in to comment.