You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-util/nforenum/files/nforenum-0_pre2309-build.patch

60 lines
1.7 KiB

diff --git a/Makefile b/Makefile
index 09e254a..cbe7573 100644
--- a/Makefile
+++ b/Makefile
@@ -29,12 +29,13 @@ NFORENUM = $(shell [ \( $(ISCYGWIN) -eq 1 \) -o \( $(ISMINGW) -eq 1 \) ] && echo
# use 386 instructions but optimize for pentium II/III
ifeq ($(ISCYGWIN),1)
-CFLAGS = -g -mno-cygwin -O1 -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized $(CFLAGAPP)
+CFLAGS += -mno-cygwin -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized
+CXXFLAGS += -mno-cygwin -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized
else
-CFLAGS = -g -O1 -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized $(CFLAGAPP)
+CFLAGS += -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized
+CXXFLAGS += -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized
endif
-CXXFLAGS = $(CFLAGS)
-include ${MAKEFILELOCAL}
@@ -120,7 +121,7 @@ BOOST_WARN = echo Warning: NO_BOOST is no longer obeyed.
endif
# targets
-all: $(NFORENUM)
+all: version.h $(NFORENUM)
remake: clean all
${MAKEFILELOCAL}:
@@ -130,7 +131,7 @@ ${MAKEFILELOCAL}:
$(NFORENUM): $(NFORENUMSRC:%.cpp=%.o)
$(_E) [LD] $@
- $(_C)$(CXX) -o $@ $(CFLAGS) $^ $(LDOPT)
+ $(_C)$(CXX) -o $@ $(CXXFLAGS) $^ $(LDOPT)
clean:
@@ -141,9 +142,7 @@ release: FORCE
$(_E)[REBUILD] $(NFORENUM)
$(_C)rm -f $(NFORENUM)
$(_C)$(MAKE) $(_S)
- $(_E) [STRIP/UPX] $(NFORENUM)
$(_C)$(STRIP) $(NFORENUM)
- $(_C)upx $(_Q) --best $(NFORENUM)
FORCE:
@$(BOOST_WARN)
@@ -175,7 +174,8 @@ version.h: FORCE
%.o.d:
$(_E) [CPP DEP] $@
- $(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG $*.c* -MF $@
+ $(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG getopt.c -MF $@
+ $(_C)$(CXX) $(CXXFLAGS) -DMAKEDEP -MM -MG $*.cpp -MF $@
ifndef NO_MAKEFILE_DEP
-include $(NFORENUMSRC:.cpp=.o.d)