The R Project SVN R

Rev

Rev 42569 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 42569 Rev 42581
1
include ../MkRules
1
include ../MkRules
2
 
2
 
3
JPEGDIR=jpeg-6b
3
JPEGDIR=jpeg-6b
4
PNGDIR=libpng
4
PNGDIR=libpng
5
 
5
 
6
.PHONY: all DLL buildzlib buildpng buildjpeg clean
6
.PHONY: all DLL buildzlib buildpng buildjpeg clean
7
 
7
 
8
all:
8
all:
9
	@$(MAKE) --no-print-directory buildzlib buildpng buildjpeg rbitmap.o
9
	@$(MAKE) --no-print-directory buildzlib buildpng buildjpeg rbitmap.o
10
	@$(MKDIR) -p ../../../library/grDevices/libs
10
	@$(MKDIR) -p ../../../library/grDevices/libs
11
	@$(MAKE) --no-print-directory DLL
11
	@$(MAKE) --no-print-directory DLL
12
 
12
 
13
DLL: ../../../library/grDevices/libs/Rbitmap.dll
13
DLL: ../../../library/grDevices/libs/Rbitmap.dll
14
 
14
 
15
buildzlib:
15
buildzlib:
16
	@$(MAKE) -C ../../extra/zlib -f Makefile.win
16
	@$(MAKE) -C ../../extra/zlib -f Makefile.win
17
 
17
 
-
 
18
## There is a makefile.mingw these days, but .std has always worked
-
 
19
## Neither the makefile.{mingw,std} build pnggccrd.c but it is needed if
-
 
20
## the compiler defines __MMX__ , which the win64 gcc does.
-
 
21
## So we need to explicitly disable it.
18
buildpng:
22
buildpng:
-
 
23
	@$(MAKE) CC='$(CC)' \
19
	@$(MAKE) CC='$(CC)' CFLAGS="-O3 -I../../../extra/zlib" \
24
	  CFLAGS="-O3 -I../../../extra/zlib -DPNG_NO_MMX_CODE" \
20
	  RANLIB=$(RANLIB) ZLIBLIB=../../../extra/zlib -C $(PNGDIR) \
25
	  RANLIB=$(RANLIB) ZLIBLIB=../../../extra/zlib -C $(PNGDIR) \
21
	  -f scripts/makefile.std libpng.a
26
	  -f scripts/makefile.std libpng.a
22
 
27
 
23
# jconfig.h and Makefile obtained running 'CC="gcc -mno-cygwin" ./configure'
28
# jconfig.h and Makefile obtained running 'CC="gcc -mno-cygwin" ./configure'
24
# under CYGWIN. They are here since the configure script doesn't run 
29
# under CYGWIN. They are here since the configure script doesn't run 
25
# (I suspect) using the reduced set of tools we distribute.
30
# (I suspect) using the reduced set of tools we distribute.
26
## 2006-01-15 checked under current tools
31
## 2006-01-15 checked under current tools
27
buildjpeg: $(JPEGDIR)/jconfig.h Makefile.jpeg
32
buildjpeg: $(JPEGDIR)/jconfig.h Makefile.jpeg
28
	$(MAKE) CC='$(CC)' AR='$(AR) rc' RANLIB=$(RANLIB) -C $(JPEGDIR) \
33
	$(MAKE) CC='$(CC)' AR='$(AR) rc' RANLIB=$(RANLIB) -C $(JPEGDIR) \
29
	  -f ../Makefile.jpeg libjpeg.a
34
	  -f ../Makefile.jpeg libjpeg.a
30
 
35
 
31
$(JPEGDIR)/jconfig.h: jconfig.h 
36
$(JPEGDIR)/jconfig.h: jconfig.h 
32
	$(CP) jconfig.h $(JPEGDIR)/jconfig.h
37
	$(CP) jconfig.h $(JPEGDIR)/jconfig.h
33
 
38
 
34
rbitmap-CPPFLAGS=-DHAVE_PNG -DHAVE_JPEG -I../../extra/zlib -I./libpng -I$(JPEGDIR) -I../../include
39
rbitmap-CPPFLAGS=-DHAVE_PNG -DHAVE_JPEG -I../../extra/zlib -I./libpng -I$(JPEGDIR) -I../../include
35
CFLAGS=-O3 -Wall -pedantic 
40
CFLAGS=-O3 -Wall -pedantic 
36
 
41
 
37
../../../library/grDevices/libs/Rbitmap.dll: rbitmap.o $(PNGDIR)/libpng.a $(JPEGDIR)/libjpeg.a
42
../../../library/grDevices/libs/Rbitmap.dll: rbitmap.o $(PNGDIR)/libpng.a $(JPEGDIR)/libjpeg.a
38
	$(DLL) -shared -s -o $@ $^ -L../../../bin -lR
43
	$(DLL) -shared -s -o $@ $^ -L../../../bin -lR
39
 
44
 
40
clean:
45
clean:
41
	$(RM) *.o *.a *.dll *.def *~ \#*\#
46
	$(RM) *.o *.a *.dll *.def *~ \#*\#
42
	-$(MAKE) CC='$(CC)' -C $(PNGDIR) -f scripts/makefile.std clean
47
	-$(MAKE) CC='$(CC)' -C $(PNGDIR) -f scripts/makefile.std clean
43
	-$(MAKE) CC='$(CC)' -C $(JPEGDIR) -f ../Makefile.jpeg clean
48
	-$(MAKE) CC='$(CC)' -C $(JPEGDIR) -f ../Makefile.jpeg clean
44
 
49
 
45
 
50
 
46
 
51
 
47
 
52