Skip to content

Commit

Permalink
- more rml cleanup
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@22942 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Oct 25, 2014
1 parent 9fd0b89 commit 7268e5c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 146 deletions.
42 changes: 5 additions & 37 deletions Compiler/Makefile.compiler_subdirs.common
@@ -1,54 +1,24 @@
#
# A common Makefile for omc_release, omc_debug, omc_profiler
# A common Makefile for subdirectories (runtime and parser)
# Should be used for both OMDev and Linux
#

include $(srcdir)/Makefile.common

all : .testvariables .depend $(ALLMO) $(SRCSIGX)
# Updated dependencies; reload make and compile the target
$(MAKE) -f $(MAKETARGET) $(PROG)
all : .testvariables .depend runtime parser

SUBDIRS = runtime parser
SRCHSRCDIR = $(SRCH:%.h=$(srcdir)/%.h)

.SUFFIXES: .o .mo .h .c
.PHONY: all vctarget absyn_subdir clean reallyclean nolink $(SUBDIRS) $(PROG)

vpath %.mo $(FRONTEND_DIR)
vpath %.mo $(FFRONTEND_DIR)
vpath %.mo $(BACKEND_DIR)
vpath %.mo $(SIMCODE_DIR)
vpath %.mo $(GLOBAL_DIR)
vpath %.mo $(TEMPLATE_DIR)
vpath %.mo $(SCRIPT_DIR)
vpath %.mo $(UTIL_DIR)
vpath %.mo $(MAIN_DIR)

.depend: $(ALLMO)
-$(RM) .depend
time $(RMLHOME)/bin/rml $(RML_INCLUDE_ALL_DIRS) -fdump-depends $(SRCMO) > .depend
.PHONY: all clean reallyclean $(SUBDIRS)

$(SRCO): %.o : %.c %.h
$(CC) $(CFLAGS) $(RMLINC) -c $<

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

%.h : %.c

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

$(SRCSIGX): %.sigx : %.mo
$(srcdir)/rml2sig/rmldep-new.sh $(RML) $<
@touch $@

vctarget: $(SRCC) absyn_subdir

absyn_subdir: $(SRCHSRCDIR)
(cd $(top_builddir)/Parser && $(MAKE) -f $(MAKETARGET) vctarget)

runtime: $(SRCHSRCDIR)
$(MAKE) -C ../runtime/ -f $(MAKETARGET)
parser: $(SRCHSRCDIR)
Expand All @@ -60,14 +30,12 @@ clean:
done
(cd $(srcdir) && $(RM) $(SRCH))
$(RM) -f .depend
$(RM) -f $(SRCO) $(SRCC) $(SRCH) $(PROG)$(EXEEXT) *~ \
$(ALLMO:%.mo=%.srz) $(SRCSIGX) $(SRCSIG) *.srz *.o *.sig *.sigx *.c *.h
$(RM) -f $(SRCO) $(SRCC) $(SRCH) *~

reallyclean: clean
$(RM) -f $(ALLMO:%.mo=%.srz) $(SRCSIGX) $(SRCSIG) $(PROG)$(EXEEXT)

# don't remove these files after intermediate build steps
.PRECIOUS: Makefile $(ALLMO)
.PRECIOUS: Makefile

Makefile: Makefile.in
cd $(top_builddir); ./config.status
Expand Down
16 changes: 2 additions & 14 deletions Compiler/Makefile.in
Expand Up @@ -39,7 +39,7 @@ SUBDIRS = runtime

.SUFFIXES:
.SUFFIXES: .o .mo .h
.PHONY: all subdirs report vctarget debug release depend clean dclean test reallyclean omc_release simcode builtin
.PHONY: all subdirs report vctarget debug release depend clean dclean test reallyclean simcode builtin

#all : debug
all : release
Expand All @@ -50,27 +50,16 @@ debug: dinstall

release: install

$(PROG): omc_release
echo Copying $(PROG)$(EXEEXT) into $(builddir_bin)
cp omc_release/$(PROG)$(EXEEXT) $(builddir_bin)/

install_scripts:
cd scripts; cp $(SCRIPT_FILES) ../$(builddir_scripts)
cp OpenModelicaBootstrappingHeader.h $(top_builddir)/build/include/omc/c/

install: install_scripts $(PROG)

nodepend:
(cd omc_release && $(MAKE))

omc_release: simcode builtin
(cd omc_release && $(MAKE))
install: install_scripts

clean:
@for d in $(SUBDIRS); do \
(cd $$d ; $(MAKE) clean) \
done
(cd omc_release; $(MAKE) clean)
-$(RM) -f $(SRCH)
-$(RM) -f $(builddir_bin)/$(PROG)$(EXEEXT)
-cd $(builddir_bin) && rm -f $(SCRIPT_FILES)
Expand All @@ -79,7 +68,6 @@ reallyclean:
@for d in $(SUBDIRS); do \
(cd $$d ; $(MAKE) reallyclean) \
done
(cd omc_release; $(MAKE) reallyclean)
-$(RM) -f $(SRCH)
-$(RM) -f $(builddir)/$(PROG)$(EXEEXT)

Expand Down
95 changes: 0 additions & 95 deletions tools/Makefile.in

This file was deleted.

0 comments on commit 7268e5c

Please sign in to comment.