Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 300328 | Differences between
and this patch

Collapse All | Expand All

(-)a/Makefile (-15 / +17 lines)
Lines 62-90 endif Link Here
62
else
62
else
63
INSTALLPATH=$(INSTALLPATH_MSYS_MINGW)
63
INSTALLPATH=$(INSTALLPATH_MSYS_MINGW)
64
endif
64
endif
65
else 
65
else
66
INSTALLPATH=$(INSTALLPATH_LINUX)
66
INSTALLPATH=$(INSTALLPATH_LINUX)
67
endif
67
endif
68
endif
68
endif
69
69
70
# use 386 instructions but optimize for pentium II/III
70
# use 386 instructions but optimize for pentium II/III
71
CFLAGS = -g -D$(TYPESIZE) -O3 -I. -O1 -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized $(CFLAGAPP)
71
CFLAGS +=  -D$(TYPESIZE)  -I.  -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized
72
CXXFLAGS +=  -D$(TYPESIZE)  -I.  -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized
72
73
73
ifeq ($(DEBUG),1)
74
ifeq ($(DEBUG),1)
74
CFLAGS += -DDEBUG
75
CFLAGS += -DDEBUG
76
CXXFLAGS += -DDEBUG
75
endif
77
endif
76
78
77
ifeq ($(MACHINE),mingw32)
79
ifeq ($(MACHINE),mingw32)
78
CFLAGS += -DMINGW
80
CFLAGS += -DMINGW
81
CXXFLAGS += -DMINGW
79
endif
82
endif
80
83
81
ifeq ($(ISCYGWIN),1)
84
ifeq ($(ISCYGWIN),1)
82
ifeq ($(NOCYGWIN),1)
85
ifeq ($(NOCYGWIN),1)
83
CFLAGS += -DMINGW -mno-cygwin
86
CFLAGS += -DMINGW -mno-cygwin
87
CXXFLAGS += -DMINGW -mno-cygwin
84
endif
88
endif
85
endif
89
endif
86
90
87
CXXFLAGS = $(CFLAGS)
88
91
89
92
90
# Somewhat automatic detection of the correct boost include folder
93
# Somewhat automatic detection of the correct boost include folder
Lines 171-177 endif Link Here
171
PAL_FILES = pals/$(subst &,.bcp pals/,$(PALORDER)).bcp
174
PAL_FILES = pals/$(subst &,.bcp pals/,$(PALORDER)).bcp
172
175
173
# deafult targets
176
# deafult targets
174
all: $(GRFCODEC) $(GRFDIFF) $(GRFMERGE)
177
all: version.h $(GRFCODEC) $(GRFDIFF) $(GRFMERGE)
175
remake: clean all
178
remake: clean all
176
179
177
${MAKEFILELOCAL}:
180
${MAKEFILELOCAL}:
Lines 181-195 ${MAKEFILELOCAL}: Link Here
181
184
182
$(GRFCODEC): $(GRFCODECSRC:%.c=%.o)
185
$(GRFCODEC): $(GRFCODECSRC:%.c=%.o)
183
	$(_E) [LD] $@
186
	$(_E) [LD] $@
184
	$(_C)$(CXX) -o $@ $(CFLAGS) $^ $(LDOPT)
187
	$(_C)$(CXX) -o $@ $(CXXFLAGS) $^ $(LDOPT)
185
188
186
$(GRFDIFF):  $(GRFDIFFSRC:%.c=%.o) grfmrg.o
189
$(GRFDIFF):  $(GRFDIFFSRC:%.c=%.o) grfmrg.o
187
	$(_E) [LD] $@
190
	$(_E) [LD] $@
188
	$(_C)$(CXX) -o $@ $(CFLAGS) $^ $(LDOPT)
191
	$(_C)$(CXX) -o $@ $(CXXFLAGS) $^ $(LDOPT)
189
192
190
$(GRFMERGE): $(GRFMERGESRC:%.c=%.o)
193
$(GRFMERGE): $(GRFMERGESRC:%.c=%.o)
191
	$(_E) [LD] $@
194
	$(_E) [LD] $@
192
	$(_C)$(CXX) -o $@ $(CFLAGS) $^ $(LDOPT)
195
	$(_C)$(CXX) -o $@ $(CXXFLAGS) $^ $(LDOPT)
193
196
194
197
195
clean:
198
clean:
Lines 219-227 FORCE: Link Here
219
	$(_E) [REBUILD] $(@:%_r=%)
222
	$(_E) [REBUILD] $(@:%_r=%)
220
	$(_C)rm -f $(@:%_r=%)
223
	$(_C)rm -f $(@:%_r=%)
221
	$(_C)$(MAKE) ${_S} $(@:%_r=%)
224
	$(_C)$(MAKE) ${_S} $(@:%_r=%)
222
	$(_E) [STRIP/UPX] $(@:%_r=%)
223
	$(_C)$(STRIP)  $(@:%_r=%)
225
	$(_C)$(STRIP)  $(@:%_r=%)
224
	$(_C)upx $(_Q) --best  $(@:%_r=%)
225
226
226
release: $(GRFCODEC)_r $(GRFDIFF)_r $(GRFMERGE)_r
227
release: $(GRFCODEC)_r $(GRFDIFF)_r $(GRFMERGE)_r
227
228
Lines 230-238 grfmrgc.bin: grfmerge.os $(GRFMERGESRC:%.c=%.os) Link Here
230
	$(_C)rm -f $@
231
	$(_C)rm -f $@
231
	$(_E) [LD] $@
232
	$(_E) [LD] $@
232
	$(_C)$(CC) -o $@ $(CFLAGS) -Os $^
233
	$(_C)$(CC) -o $@ $(CFLAGS) -Os $^
233
	$(_E) [STRIP/UPX] $@
234
	$(_C)$(STRIP) $@
234
	$(_C)$(STRIP) $@
235
	$(_C)upx $(_Q) --best $@
236
235
237
grfmrg.c:	grfmrgc.bin grfmrgc.pl
236
grfmrg.c:	grfmrgc.bin grfmrgc.pl
238
	$(_E) [PERL] $@
237
	$(_E) [PERL] $@
Lines 291-305 ttdpal.h: $(PAL_FILES) pal2c.pl Link Here
291
290
292
%.o.d:
291
%.o.d:
293
	$(_E) [CPP DEP] $@
292
	$(_E) [CPP DEP] $@
294
	$(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG $*.c* -MF $@
293
	$(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG error.c  getopt.c  grfcomm.c  grfmerge.c  path.c -MF $@
294
	$(_C)$(CXX) $(CXXFLAGS) -DMAKEDEP -MM -MG file.cc grfcodec.cc grfdiff.cc info.cc pcxfile.cc pcxsprit.cc readinfo.cc sprites.cc -MF $@
295
295
296
%.os.d:
296
%.os.d:
297
	$(_E) [CPP DEP] $@
297
	$(_E) [CPP DEP] $@
298
	$(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ $*.c*
298
	$(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ error.c getopt.c grfcomm.c grfmerge.c path.c
299
	$(_C)$(CXX) $(CXXFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ file.cc grfcodec.cc grfdiff.cc info.cc pcxfile.cc pcxsprit.cc readinfo.cc sprites.cc
299
300
300
%.obj.d: $(wildcard %.c*)
301
%.obj.d:
301
	$(_E) [CPP DEP] $@
302
	$(_E) [CPP DEP] $@
302
	$(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ $*.c*
303
	$(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ error.c  getopt.c  grfcomm.c  grfmerge.c  path.c
304
	$(_C)$(CXX) $(CXXFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ file.cc grfcodec.cc grfdiff.cc info.cc pcxfile.cc pcxsprit.cc readinfo.cc sprites.cc
303
305
304
ifndef NO_MAKEFILE_DEP
306
ifndef NO_MAKEFILE_DEP
305
-include $(GRFCODECSRC:%.c=%.o.d)
307
-include $(GRFCODECSRC:%.c=%.o.d)
(-)a/Makefile.common (-5 / +1 lines)
Lines 5-13 FORCE: Link Here
5
	$(_E) [REBUILD] $(@:%_r=%)
5
	$(_E) [REBUILD] $(@:%_r=%)
6
	$(_C)rm -f $(@:%_r=%)$(EXE)
6
	$(_C)rm -f $(@:%_r=%)$(EXE)
7
	$(_C)make -f $(MAKEFILE) $(_S) $(@:%_r=%)
7
	$(_C)make -f $(MAKEFILE) $(_S) $(@:%_r=%)
8
	$(_E) [STRIP/UPX] $(@:%_r=%)
9
	$(_C)strip  $(@:%_r=%)$(REL_EXE)
8
	$(_C)strip  $(@:%_r=%)$(REL_EXE)
10
	$(_C)upx $(_Q) --best  $(@:%_r=%)$(REL_EXE)
11
9
12
release: grfcodec_r grfdiff_r grfmerge_r
10
release: grfcodec_r grfdiff_r grfmerge_r
13
11
Lines 16-24 grfmrgc.bin: grfmerge.os $(GRFMERGESRC:%.c=%.os) Link Here
16
	$(_C)rm -f $@
14
	$(_C)rm -f $@
17
	$(_E) [LD] $@
15
	$(_E) [LD] $@
18
	$(_C)$(CC) -o $@ $(CFLAGS) -Os $^
16
	$(_C)$(CC) -o $@ $(CFLAGS) -Os $^
19
	$(_E) [STRIP/UPX] $@
20
	$(_C)strip $@
17
	$(_C)strip $@
21
	$(_C)upx $(_Q) --best $@
22
18
23
grfmrg.c:	grfmrgc.bin grfmrgc.pl
19
grfmrg.c:	grfmrgc.bin grfmrgc.pl
24
	$(_E) [PERL] $@
20
	$(_E) [PERL] $@
Lines 32-38 ttdpal.h: $(PAL_FILES) pal2c.pl Link Here
32
28
33
readinfo.o: readinfo.cc
29
readinfo.o: readinfo.cc
34
	$(_E) [CPP] $@
30
	$(_E) [CPP] $@
35
	$(BOOST_WARN)	
31
	$(BOOST_WARN)
36
	$(_C)$(CXX) -c -o $@ -MMD -MG -MF $@.d $(CXXFLAGS) $<
32
	$(_C)$(CXX) -c -o $@ -MMD -MG -MF $@.d $(CXXFLAGS) $<
37
33
38
%.o : %.c
34
%.o : %.c

Return to bug 300328