The R Project SVN R

Rev

Rev 85033 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
83753 kalibera 1
include ../MkRules
2
R_HOME = ../../..
3
 
87747 kalibera 4
CFLAGS = -O3 -Wall -pedantic $(CSTD)
83753 kalibera 5
ifdef DEBUG
6
 CFLAGS += $(G_FLAG)
7
 LINKFLAGS =
8
 DLLFLAGS =
9
else
10
 LINKFLAGS = -s
11
 DLLFLAGS = -s
12
endif
13
CPPFLAGS = -I../../include $(arch_DEFS)
14
 
15
## Increase stack size to 64Mb
16
LARGE_STACK = -Wl,--stack=0x4000000
17
 
18
rcmdfn-CFLAGS = -DBINDIR='"$(BINDIR)"'
19
 
20
.PHONY : all makeMakedeps
21
 
22
all: makeMakedeps \
23
     $(R_HOME)/$(BINDIR)/Rgui.exe $(R_HOME)/$(BINDIR)/Rterm.exe \
84987 kalibera 24
     $(R_HOME)/$(BINDIR)/Rcmd.exe $(R_HOME)/$(BINDIR)/RSetReg.exe \
25
     $(R_HOME)/$(BINDIR)/open.exe \
26
     $(R_HOME)/bin/R.exe \
27
     $(R_HOME)/bin/Rscript.exe
83753 kalibera 28
 
29
$(R_HOME)/$(BINDIR)/Rgui.exe: Rgui.exe
30
	$(MKDIR) -p $(R_HOME)/$(BINDIR)
31
	$(CP) $^ $@
32
 
33
$(R_HOME)/$(BINDIR)/Rterm.exe: Rterm.exe
34
	$(MKDIR) -p $(R_HOME)/$(BINDIR)
35
	$(CP) $^ $@	
36
 
37
$(R_HOME)/$(BINDIR)/Rcmd.exe: Rcmd.exe
38
	$(MKDIR) -p $(R_HOME)/$(BINDIR)
39
	$(CP) $^ $@
40
 
41
$(R_HOME)/$(BINDIR)/RSetReg.exe: RSetReg.exe
42
	$(MKDIR) -p $(R_HOME)/$(BINDIR)
43
	$(CP) $^ $@
44
 
45
$(R_HOME)/$(BINDIR)/R.exe: R.exe
46
	$(MKDIR) -p $(R_HOME)/$(BINDIR)
47
	$(CP) $^ $@	
48
 
84987 kalibera 49
ifneq "$(R_ARCH)" ""
50
 
51
all: $(R_HOME)/$(BINDIR)/Rfe.exe \
52
     $(R_HOME)/$(BINDIR)/Rscript.exe \
53
     $(R_HOME)/$(BINDIR)/R.exe
54
 
83753 kalibera 55
$(R_HOME)/$(BINDIR)/Rfe.exe: Rfe.exe
56
	$(MKDIR) -p $(R_HOME)/$(BINDIR)
57
	$(CP) $^ $@
58
 
59
$(R_HOME)/bin/R.exe: Rfe.exe
60
	$(MKDIR) -p $(R_HOME)/bin
61
	$(CP) $^ $@	
62
 
63
$(R_HOME)/bin/Rscript.exe: Rfe.exe
64
	$(MKDIR) -p $(R_HOME)/bin
65
	$(CP) $^ $@	
84987 kalibera 66
endif
83753 kalibera 67
 
68
$(R_HOME)/$(BINDIR)/Rscript.exe: Rscript.exe
69
	$(MKDIR) -p $(R_HOME)/$(BINDIR)
70
	$(CP) $^ $@	
71
 
72
$(R_HOME)/$(BINDIR)/open.exe: open.exe
73
	$(MKDIR) -p $(R_HOME)/$(BINDIR)
74
	$(CP) $^ $@	
75
 
76
rgui-CPPFLAGS = -DWin32
77
rterm-CPPFLAGS = -DWin32
78
 
79
## -luser32 -lkernel32 -ladvapi32 -lshell32 are now standard
83755 kalibera 80
R-LIBS = -lole32 -luuid
81
Rcmd-LIBS = -lole32 -luuid
82
Rfe-LIBS = -lole32 -luuid
83753 kalibera 83
Rgui-LIBS = -L../../../$(IMPDIR) -lR -lRgraphapp
84
Rscript-LIBS = -L../../../$(IMPDIR) -lR -lRgraphapp -lshlwapi
85
Rterm-LIBS = -L../../../$(IMPDIR) -lR -lRgraphapp -lshlwapi
86
 
87
Rgui-LINKFLAGS = -mwindows $(LARGE_ADDR) $(LARGE_STACK)
88
Rterm-LINKFLAGS = $(LARGE_ADDR) $(LARGE_STACK)
89
Rscript-LINKFLAGS = $(LARGE_ADDR) $(LARGE_STACK)
90
 
91
Rgui.exe: graphappmain.o rgui.o rgico.o
92
Rterm.exe: graphappmain.o rterm.o rtico.o
93
 
84980 kalibera 94
ifeq "$(WIN)" "32"
83753 kalibera 95
rcico.o: Rcmd.exe.manifest
96
rgico.o: RGui32.manifest
97
rsico.o: Rscript.exe.manifest
98
rtico.o: Rterm32.manifest
99
else
100
RESFLAGS = -DWN64
101
rcico.o: Rcmd64.exe.manifest
102
rtico.o: Rterm64.manifest
103
rsico.o: Rscript64.exe.manifest
104
rgico.o: RGui64.manifest
105
endif
106
 
107
Rcmd.exe: rcmd.o ../rhome.o ../shext.o rcico.o rcmdfn.o Renviron.o
108
 
109
R.exe: R.o ../rhome.o ../shext.o rcico.o rcmdfn.o Renviron.o
110
 
111
Rfe.exe: Rfe.o ../rhome.o ../shext.o rcico.o rcmdfn.o Renviron.o
112
 
113
RSetReg.exe: RSetReg.o ../rhome.o rcico.o
114
 
115
Rscript.o: ../../unix/Rscript.c ../../include/Rversion.h
116
	$(CC) $(CFLAGS) -DBINDIR='"$(BINDIR)"' -I. -I../../include -DHAVE_CONFIG_H -c $< -o $@
117
 
118
Renviron.o: ../../main/Renviron.c
119
	$(CC) $(CFLAGS) -I. -I../../include -DRENVIRON_WIN32_STANDALONE -c $< -o $@
120
 
121
Rscript.exe: Rscript.o rsico.o 
122
 
123
## Used only in writing etc/.../Makeconf
124
Rpwd:
125
	$(MAKE) -C ../../include -f Makefile.win version
126
	$(MAKE) Rpwd.exe
127
 
128
Rpwd.exe: rpwd.o rcico.o
129
 
130
rcmd.o R.o rgui.o rterm.o RSetReg.o rgico.o rtico.o rcico.o rsico.c: ../../include/Rversion.h
131
 
132
open.o: open.c
133
open.exe: open.o
134
 
135
clean:
136
	$(RM) *.o *.obj *.exe *~ *.exp *.dll *.lib *.a *.d Makedeps
137
 
138
CSOURCES = $(filter-out R.c rcmd.c rpwd.c rtest.c, $(wildcard *.c))
139
DEPS = $(CSOURCES:.c=.d)
140
 
141
makeMakedeps: $(DEPS)
142
	@$(RM) Makedeps
143
ifneq ($(strip $(DEPS)),)
144
	@cat $(DEPS) >> Makedeps
145
endif
146
 
147
-include Makedeps