mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-10 11:23:15 +00:00
Avoid compile-time warnings when compiling getopt.
Estimated hours taken: 0.1 Branches: main util/Mmakefile: Avoid compile-time warnings when compiling getopt.
This commit is contained in:
@@ -24,6 +24,8 @@ PROGS=mkinit mdemangle info_to_mdb
|
||||
PROGFILENAMES=$(PROGS:%=%$(EXT_FOR_EXE))
|
||||
SRC=$(PROGS:%=%.c)
|
||||
|
||||
# GETOPT_FLAGS suppresses warnings about the prototype of getopt
|
||||
GETOPT_FLAGS=-D__GNU_LIBRARY__
|
||||
GETOPT_SRC=$(RUNTIME_DIR)/GETOPT/getopt.c $(RUNTIME_DIR)/GETOPT/getopt1.c
|
||||
|
||||
# mkinit.c needs `struct stat'
|
||||
@@ -34,7 +36,7 @@ MGNUCFLAGS-mkinit = --no-ansi
|
||||
all: $(PROGS)
|
||||
|
||||
.c:
|
||||
$(MGNUC) $(GRADEFLAGS) $(ALL_MGNUCFLAGS) -o $@ $< $(GETOPT_SRC)
|
||||
$(MGNUC) $(GRADEFLAGS) $(ALL_MGNUCFLAGS) $(GETOPT_FLAGS) -o $@ $< $(GETOPT_SRC)
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
Reference in New Issue
Block a user