aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in18
1 files changed, 10 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in
index 75aa0d1a8..f07598d92 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -89,8 +89,8 @@ endif
WARN_ADAFLAGS+=-gnatwa -gnatwC -gnatf
GNATFLAGS=-gnat12 -gnaty3befhkmr $(OPT_FLAGS) $(COVERAGE_FLAGS) $(WARN_ADAFLAGS) $(ADA_FLAGS)
-GRT_FLAGS=$(OPT_FLAGS) $(COVERAGE_FLAGS)
-GRT_ADAFLAGS:=$(WARN_ADAFLAGS) -gnatw.X $(filter-out -gnata,$(ADA_FLAGS))
+GRT_FLAGS=$(COVERAGE_FLAGS)
+GRT_ADAFLAGS:=$(OPT_FLAGS) $(WARN_ADAFLAGS) -gnatw.X $(filter-out -gnata,$(ADA_FLAGS))
ifeq "$(default_pic)" "true"
GRT_FLAGS+=$(PIC_FLAGS)
@@ -98,6 +98,8 @@ endif
WARN_CFLAGS=-Wall
+CFLAGS:=$(OPT_FLAGS) $(WARN_CFLAGS) $(CFLAGS)
+
GNAT_BARGS=-bargs -E
target=$(build)
@@ -199,7 +201,7 @@ ghdl_mcode$(EXEEXT): $(GRT_ADD_OBJS) $(GRT_SRC_DEPS) $(ORTHO_DEPS) \
$(GNATMAKE) -o $@ -gnat12 $(GHDL_MCODE_INCFLAGS) $(GNATFLAGS) -gnatw.A ghdl_jit.adb $(GNAT_BARGS) -largs memsegs_c.o chkstk.o $(GRT_ADD_OBJS) $(LDFLAGS) $(GNAT_LARGS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB) $(GRT_EXEC_OPTS))
memsegs_c.o: $(srcdir)/src/ortho/mcode/memsegs_c.c
- $(CC) -c $(OPT_FLAGS) $(COVERAGE_FLAGS) $(CFLAGS) -o $@ $<
+ $(CC) -c $(COVERAGE_FLAGS) $(CFLAGS) -o $@ $<
libs.vhdl.mcode: ghdl_mcode$(EXEEXT)
$(MAKE) -f $(srcdir)/libraries/Makefile.inc $(LIBVHDL_FLAGS_TO_PASS) GHDL=$(PWD)/ghdl_mcode$(EXEEXT) GHDL_FLAGS="" VHDL_COPY_OBJS=no vhdl.libs.all
@@ -366,7 +368,7 @@ ghdl1-llvm$(EXEEXT): version.ads force
ortho_srcdir=$(srcdir)/src/ortho ortho_exec=$@ \
GNATFLAGS="$(GHDL_LLVM_INCFLAGS) $(GNATFLAGS)" LDFLAGS="$(LDFLAGS)" \
LLVM_CONFIG="$(LLVM_CONFIG)" CXX="$(CXX)" \
- CFLAGS="$(WARN_FLAGS) $(OPT_FLAGS) $(COVERAGE_FLAGS) $(CFLAGS)" \
+ CFLAGS="$(COVERAGE_FLAGS) $(CFLAGS)" \
GNATMAKE="$(GNATMAKE)" all
oread-llvm$(EXEEXT): force
@@ -486,10 +488,10 @@ libghw$(SOEXT): libghw.o
$(CC) $(PIC_FLAGS) -shared -o lib/$@ libghw.o
ghwdump.o: $(srcdir)/ghw/ghwdump.c $(srcdir)/ghw/libghw.h
- $(CC) -c -o $@ $< $(OPT_FLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) $(CFLAGS)
+ $(CC) -c -o $@ $< $(COVERAGE_FLAGS) $(CFLAGS)
libghw.o: $(srcdir)/ghw/libghw.c $(srcdir)/ghw/libghw.h
- $(CC) $(PIC_FLAGS) -c -o $@ $< $(OPT_FLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) $(CFLAGS)
+ $(CC) $(PIC_FLAGS) -c -o $@ $< $(COVERAGE_FLAGS) $(CFLAGS)
all.ghw: ghwdump$(EXEEXT) libghw$(SOEXT)
@@ -530,10 +532,10 @@ uninstall.grt:
################ VPI #####################################################
vpi_thunk.o: $(GRTSRCDIR)/vpi_thunk.c $(GRTSRCDIR)/vpi_thunk.h
- $(CC) -c -o $@ $< $(PIC_FLAGS) $(OPT_FLAGS) $(WARN_CFLAGS) $(CFLAGS)
+ $(CC) -c -o $@ $< $(PIC_FLAGS) $(CFLAGS)
vhpi_thunk.o: $(GRTSRCDIR)/vhpi_thunk.c $(GRTSRCDIR)/vhpi_thunk.h
- $(CC) -c -o $@ $< $(PIC_FLAGS) $(OPT_FLAGS) $(WARN_CFLAGS) $(CFLAGS)
+ $(CC) -c -o $@ $< $(PIC_FLAGS) $(CFLAGS)
lib/libghdlvpi$(SOEXT): vpi_thunk.o vhpi_thunk.o
$(CC) -o $@ $^ -shared $(SHLIB_FLAGS)