Revision 1438 trunk/src/GNUmakefile

GNUmakefile (revision 1438)
1 1
ifeq ($(OS),Windows_NT)
2
  ifneq (,$(findstring sh.exe,$(SHELL)))
3
    ifeq ($(SHELL),sh.exe)
2
  ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
3
    SHELL = cmd
4
    ifeq ($(SHELL),cmd)
4 5
      MYPWD=$(shell cd)
5 6
    else
6 7
      MYPWD=$(shell cmd /C cd)
......
24 25
  endif
25 26
endif
26 27

  
27
ifeq ($(SHELL),sh.exe)
28
ifeq ($(SHELL),cmd)
28 29
  DIST=..\build\dist
29 30
  LIBSDIR=$(DIST)\lib
30 31
  LIBSDIR:=$(addsuffix \,$(LIBSDIR))
......
70 71

  
71 72
CXXFLAGS:= $(CXXFLAGS) -DSAFE_ALL -D__GNUDOS__ -Dlinux -D__SPDLL__ -DUSE_LAPLACE
72 73

  
73
ifeq ($(SHELL),sh.exe)
74
ifeq ($(SHELL),cmd)
74 75
CXXFLAGS:= $(CXXFLAGS) -I..\build\dist\include
75 76
else
76 77
CXXFLAGS:= $(CXXFLAGS) -I../build/dist/include
......
100 101

  
101 102
OBJECTS:=$(sort $(addprefix $(OBJSDIR),$(OBJECTS)))
102 103

  
103
all: revision dist contrib
104
all: dist
105
ifeq ($(SHELL),cmd)
106
	-svnversion .. > ${DIST}\REVISION
107
else
108
	-svnversion .. > ${DIST}/REVISION
109
	touch $(DIST)/include/contrib.h
110
endif
104 111
	@echo ADMB build completed.
105 112
	@echo Check README.txt for usage and installation information.
106 113

  
107
shared: includes objects
114
shared: objects
108 115
	$(CXX) -shared -o${DIST}/lib/libadmb.so ../build/objects/dist/saflp-*.obj
109 116
	$(CXX) -shared -o${DIST}/lib/libadmbo.so ../build/objects/dist/optlp-*.obj
110 117
	@echo ADMB shared build completed.
111 118
	@echo Check README.txt for usage and installation information.
112 119

  
113
revision:
114
ifeq ($(SHELL),sh.exe)
115
	-svnversion .. > ..\REVISION
116
else
117
	-svnversion .. > ../REVISION
118
endif
119

  
120
contrib:
121
ifeq ($(SHELL),sh.exe)
122
	if not exist ${DIST}\contrib md ${DIST}\contrib
123
	if not exist ${DIST}\contrib\lib md ${DIST}\contrib\lib
124
	if not exist ${DIST}\contrib\bin md ${DIST}\contrib\bin
125
	if not exist ${DIST}\contrib\include md ${DIST}\contrib\include
126
	$(MAKE) DIST=${DIST} --directory=..\contrib
127
else
128
	mkdir -p ${DIST}/contrib/lib
129
	mkdir -p ${DIST}/contrib/bin
130
	mkdir -p ${DIST}/contrib/include
131
	$(MAKE) DIST=${DIST} --directory=../contrib
132
endif
133

  
134
dist: libs bins docs
135
ifeq ($(SHELL),sh.exe)
136
	if not exist ${DIST}\examples md ${DIST}\examples
137
	xcopy ..\examples $(DIST)\examples /S /Y /D
120
dist: bins
121
ifeq ($(SHELL),cmd)
138 122
	copy /Y ..\LICENSE.txt ${DIST}
139 123
	copy /Y ..\README.txt ${DIST}
140 124
	copy /Y ..\CHANGES.txt ${DIST}
141 125
	copy /Y ..\VERSION ${DIST}
142 126
	copy /Y ..\Makefile ${DIST}
143 127
else
144
	cp -R ../examples ${DIST}
145 128
	cp -f ../LICENSE.txt ${DIST}
146 129
	cp -f ../README.txt ${DIST}
147 130
	cp -f ../CHANGES.txt ${DIST}
......
149 132
	cp -f ../Makefile ${DIST}
150 133
endif
151 134

  
152
dist2:
153
ifeq ($(SHELL),sh.exe)
154
	if not exist ${DIST}\contrib md ${DIST}\contrib
155
	xcopy ..\contrib $(DIST)\contrib /S /Y /D
156
	if not exist ${DIST}\docs md ${DIST}\docs
157
	xcopy ..\docs $(DIST)\docs /S /Y /D
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff