Makefile 15.9 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (C) 2013-2016 Altera Corporation, San Jose, California, USA. All rights reserved.
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to
# whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or
# substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# 
# This agreement shall be governed in all respects by the laws of the State of California and
# by the laws of the United States of America.
# This is a GNU Makefile.

# You must configure ALTERAOCLSDKROOT to point the root directory of the Intel(R) FPGA SDK for OpenCL(TM)
# software installation.
# See http://www.altera.com/literature/hb/opencl-sdk/aocl_getting_started.pdf 
# for more information on installing and configuring the Intel(R) FPGA SDK for OpenCL(TM).

Leonardo Solis's avatar
Leonardo Solis committed
28
29
VERBOSE = 1

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
ifeq ($(VERBOSE),1)
ECHO := 
else
ECHO := @
endif

# Where is the Intel(R) FPGA SDK for OpenCL(TM) software?
ifeq ($(wildcard $(ALTERAOCLSDKROOT)),)
$(error Set ALTERAOCLSDKROOT to the root directory of the Intel(R) FPGA SDK for OpenCL(TM) software installation)
endif
ifeq ($(wildcard $(ALTERAOCLSDKROOT)/host/include/CL/opencl.h),)
$(error Set ALTERAOCLSDKROOT to the root directory of the Intel(R) FPGA SDK for OpenCL(TM) software installation.)
endif

# OpenCL compile and link flags.
AOCL_COMPILE_CONFIG := $(shell aocl compile-config )
AOCL_LINK_CONFIG := $(shell aocl link-config )

#= defines a recursively-expanded variable
#:= defines a simply-expanded variable


# Compilation flags
ifeq ($(DEBUG),1)
CXXFLAGS += -g
else
CXXFLAGS += -O2
endif

# Compiler
CXX := g++

62
# Target name
63
TARGET := host
64
65

# Target folder for host & emulation binaries
66
67
TARGET_DIR := bin

68
69
70
# Target folder only for kernel report
TARGET_DIR_RPT := bin_rpt

71
72
73
74
75
76
# Target folder for FPGA binary
TARGET_DIR_HW := bin_hw

# Target folder for FPGA binary instrumented with performance counters
TARGET_DIR_HW_PROF := bin_hw_profile

77
78
# Directories
#INC_DIRS := ../common/inc
79
INC_DIRS := ../common/inc wrapcl/inc host/inc ./
80
81
82
83
84
85
86
87
LIB_DIRS := 

# Files
INCS := $(wildcard )

#SRCS := $(wildcard host/src/*.cpp ../common/src/AOCLUtils/*.cpp)

#AOCL_SRCS:=$(../common/src/AOCLUtils/*.cpp)
88
#OCL_SRCS:=$(wildcard wrapcl/src/*.cpp)
89
90
91
92
93
94
#DOCK_SRCS:=$(wildcard host/src/*.cpp)
#SRCS := $(AOCL_SRCS) $(OCL_SRCS) $(DOCK_SRCS) 
# Do not separate them
# Compilation and linking are done in a single step
# Otherwise, undefined functions when make
# http://stackoverflow.com/questions/5559250/c-error-undefined-reference-to-function-but-it-is-defined
95
SRCS := $(wildcard ../common/src/AOCLUtils/*.cpp wrapcl/src/*.cpp host/src/*.cpp)
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142

LIBS := rt pthread

# =============================
# Select OpenCL device type
# =============================
CPU_DEVICE=NO
GPU_DEVICE=NO
FPGA_DEVICE=NO

ifeq ($(CPU_DEVICE),YES)
	DEV =-DCPU_DEVICE

else ifeq ($(GPU_DEVICE),YES)
	DEV =-DGPU_DEVICE

else ifeq ($(FPGA_DEVICE),YES)
	DEV =-DFPGA_DEVICE
else 
	DEV =-DALL_DEVICE
endif

# =============================
# Print progress info
# =============================
PRINT_PROGRESS=YES

ifeq ($(PRINT_PROGRESS),YES)
	DOCK_PROG =-DPRINT_PROGRESS
else
	DOCK_PROG =
endif

# =============================
# Print docking debug info
# =============================
DOCK_DEBUG=NO

ifeq ($(DOCK_DEBUG),YES)
	DOCK_DEBUG_FLAG =-DDOCK_DEBUG
else
	DOCK_DEBUG_FLAG =
endif

# =============================
# Enable Kernels
# ============================= 
Leonardo Solis's avatar
Leonardo Solis committed
143
144
145
146
147
148
149
ENABLE_K1  = YES
ENABLE_K2  = YES
ENABLE_K3  = YES
ENABLE_K4  = YES

ENABLE_K6  = YES
ENABLE_K10 = YES
150
ENABLE_K27 = YES
151
152
ENABLE_K36 = YES

153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
ifeq ($(ENABLE_K1),YES)
	K1 =-DENABLE_KERNEL1
else
	K1 =
endif

ifeq ($(ENABLE_K2),YES)
	K2 =-DENABLE_KERNEL2
else
	K2 =
endif

ifeq ($(ENABLE_K3),YES)
	K3 =-DENABLE_KERNEL3
else
	K3 =
endif

ifeq ($(ENABLE_K4),YES)
	K4 =-DENABLE_KERNEL4
else
	K4 =
endif

Leonardo Solis's avatar
Leonardo Solis committed
177
178
179
180
181
182
183
184
185
186
187
188
ifeq ($(ENABLE_K6),YES)
	K6 =-DENABLE_KERNEL6
else
	K6 =
endif

ifeq ($(ENABLE_K10),YES)
	K10 =-DENABLE_KERNEL10
else
	K10 =
endif

189
190
191
192
193
194
ifeq ($(ENABLE_K27),YES)
	K27 =-DENABLE_KERNEL27
else
	K27 =
endif

195
196
197
198
199
200
ifeq ($(ENABLE_K36),YES)
	K36 =-DENABLE_KERNEL36
else
	K36 =
endif

201
ENABLE_KERNELS = $(K1) $(K2) $(K3) $(K4) $(K6) $(K10) $(K27) $(K36) 
202

203
204
205
# =============================
# Reproduce result (remove randomness)
# =============================
206
REPRO=NO
207
208
209
210
211
212
213

ifeq ($(REPRO), YES)
	REP=-DREPRO
else	
	REP=
endif

214
215
216
217
# =============================
# Fixed-point
# =============================
# FIxed-POint COform flag (FIPOCO)
Leonardo Solis's avatar
Leonardo Solis committed
218
FIXED_POINT_CONFORM=YES
219
220
FIXED_POINT_INTERE=NO
FIXED_POINT_INTRAE=NO
221

222
SINGLE_COPY_POP_ENE=YES
Leonardo Solis's avatar
Leonardo Solis committed
223
224
SEPARATE_FGRID_INTERE=NO

225
226
227
228
229
230
ifeq ($(FIXED_POINT_CONFORM), YES)
	FIPOCO_FLAG=-DFIXED_POINT_CONFORM
else	
	FIPOCO_FLAG=
endif

231
232
233
234
235
236
237
238
239
240
241
242
ifeq ($(FIXED_POINT_INTERE), YES)
	FIPOIE_FLAG=-DFIXED_POINT_INTERE
else	
	FIPOIE_FLAG=
endif

ifeq ($(FIXED_POINT_INTRAE), YES)
	FIPOIA_FLAG=-DFIXED_POINT_INTRAE
else	
	FIPOIA_FLAG=
endif

243
244
245
246
247
248
ifeq ($(SINGLE_COPY_POP_ENE), YES)
	COPYPOPENE_FLAG=-DSINGLE_COPY_POP_ENE
else	
	COPYPOPENE_FLAG=
endif

Leonardo Solis's avatar
Leonardo Solis committed
249
250
251
252
253
254
ifeq ($(SEPARATE_FGRID_INTERE), YES)
	SEP_FGRID_FLAG=-DSEPARATE_FGRID_INTERE
else	
	SEP_FGRID_FLAG=
endif

255
FIPO_FLAG = $(FIPOCO_FLAG) $(FIPOIE_FLAG) $(FIPOIA_FLAG) \
256
	    $(COPYPOPENE_FLAG) $(SEP_FGRID_FLAG) 
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284

# =============================
# AOC flags
# =============================

# customized __constant memory size
# default: 16 KB
# custom: 12KB = 12288 Bytes
CUSTOMSIZE_CONSTMEM = YES

# relax the order of fp operations: --fp-relaxed
# reduce fp rounding operations: --fpc
RELAXED_REDUCED_FLOATINGPOINT = YES

ifeq ($(CUSTOMSIZE_CONSTMEM), YES)
	CUSTOMSIZE_CONSTMEM_FLAG=--const-cache-bytes 12288
else	
	CUSTOMSIZE_CONSTMEM_FLAG=
endif

ifeq ($(RELAXED_REDUCED_FLOATINGPOINT), YES)
	RELAXED_REDUCED_FLOATINGPOINT_FLAG=--fp-relaxed --fpc
else	
	RELAXED_REDUCED_FLOATINGPOINT_FLAG=
endif


AOC_FLAG = $(CUSTOMSIZE_CONSTMEM_FLAG) $(RELAXED_REDUCED_FLOATINGPOINT_FLAG)
285

286
# =============================
287

288
289
290
291
292
293
294
# Note that the definition of "newline" contains two blank lines.
# Using $(newline) will expand into only one newline.
define newline


endef

295
296
297
298
299
300
301
302
303
304
305
306
307
# Make it all!
all : $(TARGET_DIR)/$(TARGET)

# Host executable target.
#$(TARGET_DIR)/$(TARGET) : Makefile $(SRCS) $(INCS) $(TARGET_DIR)
#	$(ECHO)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC $(foreach D,$(INC_DIRS),-I$D) \
#			$(AOCL_COMPILE_CONFIG) $(SRCS) $(AOCL_LINK_CONFIG) \
#			$(foreach D,$(LIB_DIRS),-L$D) \
#			$(foreach L,$(LIBS),-l$L) \
#			-o $(TARGET_DIR)/$(TARGET)

$(TARGET_DIR)/$(TARGET) : Makefile $(SRCS) $(INCS) $(TARGET_DIR)
	$(ECHO)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC $(foreach D,$(INC_DIRS),-I$D) \
308
			$(AOCL_COMPILE_CONFIG) $(SRCS) $(AOCL_LINK_CONFIG) \
309
310
			$(foreach D,$(LIB_DIRS),-L$D) \
			$(foreach L,$(LIBS),-l$L) \
311
			-o $(TARGET_DIR)/$(TARGET) $(DOCK_DEBUG_FLAG) $(DEV) $(DOCK_PROG) $(ENABLE_KERNELS) $(REP) $(FIPO_FLAG)
312
313
314
315
316
	@echo $(newline)
	@echo "========================================================"
	@echo "INFO: host binary is under: \"$(TARGET_DIR)/$(TARGET)\" "
	@echo "========================================================"
	@echo $(newline)
317

318
319
320
321
# Docking parameters 
# that directly determine the execution time
# Following values are used only for emulation
# to have a short but still a representative test
Leonardo Solis's avatar
Leonardo Solis committed
322
PDB  := 1stp
Leonardo Solis's avatar
Leonardo Solis committed
323
PSIZE:= 150
Leonardo Solis's avatar
Leonardo Solis committed
324
NRUN := 5
Leonardo Solis's avatar
Leonardo Solis committed
325
NEV  := 50000
Leonardo Solis's avatar
Leonardo Solis committed
326
327
NGEN := 27000
GFPOP:= 0
Leonardo Solis's avatar
Leonardo Solis committed
328
329
330

# Project name
PROJECT_NAME := ofdock_taskpar_alt
331

332
333
334
# Device folder
# Device main kernel name
# Device main kernel source
Leonardo Solis's avatar
Leonardo Solis committed
335
# Target board
Leonardo Solis's avatar
Leonardo Solis committed
336
DEV_DIRS := device
Leonardo Solis's avatar
Leonardo Solis committed
337
338
KRNL_NAME:= Krnl_GA
DEV_SRC  := $(DEV_DIRS)/$(KRNL_NAME).cl
Leonardo Solis's avatar
Leonardo Solis committed
339
BOARD    := Proc10A_X115
Leonardo Solis's avatar
Leonardo Solis committed
340
#BOARD    := a10gx
Leonardo Solis's avatar
Leonardo Solis committed
341

342
343
344
345
346
## Make it all: compilation (host & device) + run emulation
## Notice, it switches automatically to /bin folder
#emu: $(TARGET_DIR)/$(TARGET) keremu runemu

# Build kernel binary only for emulation
Leonardo Solis's avatar
Leonardo Solis committed
347
# Add "-g" to support kernel debug
348
# Creates under bin: 
349
350
351
# $(KRNL_NAME) folder
# $(KRNL_NAME).aoco
# $(KRNL_NAME).aocx
Leonardo Solis's avatar
Leonardo Solis committed
352
keremu: $(DEV_SRC)
353
	aoc -march=emulator -v --board $(BOARD) $(DEV_SRC) -o $(TARGET_DIR)/$(KRNL_NAME).aocx $(REP) $(FIPO_FLAG) $(AOC_FLAG) -g
354
355
356
357
358
	@echo $(newline)
	@echo "=============================================================================="
	@echo "INFO: emulation files are under: \"$(TARGET_DIR)/$(KRNL_NAME)(.aoco)(.aocx)\" "
	@echo "=============================================================================="
	@echo $(newline)
359

360

361
362
363
# Run emulation
# Compilation (host & device) if not done previously
# The working directory is changed
Leonardo Solis's avatar
Leonardo Solis committed
364
# So .dlg file is written in $(TARGET_DIR)
365
emu: $(TARGET_DIR)/$(TARGET) keremu
Leonardo Solis's avatar
Leonardo Solis committed
366
	cd $(TARGET_DIR) && \
Leonardo Solis's avatar
Leonardo Solis committed
367
368
369
370
	CL_CONTEXT_EMULATOR_DEVICE_ALTERA=1 ./$(TARGET) \
	-ffile ../input/$(PDB)/derived/$(PDB)_protein.maps.fld \
	-lfile ../input/$(PDB)/derived/$(PDB)_ligand.pdbqt \
	-psize $(PSIZE) -nrun $(NRUN) -nev $(NEV) -ngen $(NGEN) -gfpop 1
371
372
373
374
375
	@echo $(newline)
	@echo "======================================================="
	@echo "INFO: log file is under: \"$(TARGET_DIR)/docking.dlg\" "
	@echo "======================================================="
	@echo $(newline)
376
377
378
379
380


# Reports are generated
# Could be used in multistep compilation
# Creates under bin:
381
382
383
# $(KRNL_NAME) folder -> /reports/report.html, to see details
# $(KRNL_NAME).aoco
# No actual hardware is built (NO .aocx)
384
kerrpt: $(DEV_SRC)
385
	aoc --board $(BOARD) $(DEV_SRC) -o $(TARGET_DIR_RPT)/$(KRNL_NAME).aoco $(REP) $(FIPO_FLAG) $(AOC_FLAG) -c --report -g
386
387
388
389
390
391
392
393
394
	@echo $(newline)
	@echo "====================================================================================="
	@echo "INFO: THIS WORKS ONLY FROM V16.1 ON:                                                 "
	@echo "INFO: report files are under: \"$(TARGET_DIR_RPT)/$(KRNL_NAME)/reports/report.html\" "
	@echo $(newline)
	@echo "INFO: THIS WORKS IN V16.0 AND OLDER:                                                 "
	@echo "INFO: report file is under: \"$(TARGET_DIR_RPT)/$(KRNL_NAME)/$(KRNL_NAME).log\"      "
	@echo "====================================================================================="
	@echo $(newline)
395

396

397
398
# Build hw (FPGA bitstream)
# NOT integrated yet in a multistep compilation
399
# Creates under bin_hw:
400
401
402
# $(KRNL_NAME) folder
# $(KRNL_NAME).aoco
# $(KRNL_NAME).aocx
403
hw: 	
404
	aoc --board $(BOARD) $(DEV_SRC) -o $(TARGET_DIR_HW)/$(KRNL_NAME).aocx $(FIPO_FLAG) $(AOC_FLAG)
405
406
407
408
409
	@echo $(newline)
	@echo "==============================================================================="
	@echo "INFO: FPGA bitstream is under: \"$(TARGET_DIR_HW)/$(KRNL_NAME)(.aoco)(.aocx)\" "
	@echo "==============================================================================="
	@echo $(newline)
Leonardo Solis's avatar
Leonardo Solis committed
410

411

412
hw-he:
413
	aoc --high-effort --board $(BOARD) $(DEV_SRC) -o $(TARGET_DIR_HW)/$(KRNL_NAME).aocx $(FIPO_FLAG) $(AOC_FLAG)
414
415
416
417
418
	@echo $(newline)
	@echo "==============================================================================="
	@echo "INFO: FPGA bitstream is under: \"$(TARGET_DIR_HW)/$(KRNL_NAME)(.aoco)(.aocx)\" "
	@echo "==============================================================================="
	@echo $(newline)
419

420

421
422
423
# Build hw (FPGA bitstream) instrumented with performance counters
# NOT integrated yet in a multistep compilation
# Creates under bin_hw_profile
424
425
426
# $(KRNL_NAME) folder
# $(KRNL_NAME).aoco
# $(KRNL_NAME).aocx
427
hw-prof:
428
	aoc --profile --board $(BOARD) $(DEV_SRC) -o $(TARGET_DIR_HW_PROF)/$(KRNL_NAME).aocx $(FIPO_FLAG) $(AOC_FLAG)
429
430
431
432
433
	@echo $(newline)
	@echo "================================================================================================="
	@echo "INFO: instrumented FPGA bitstream is under: \"$(TARGET_DIR_HW_PROF)/$(KRNL_NAME)(.aoco)(.aocx)\" "
	@echo "================================================================================================="
	@echo $(newline)
434

Leonardo Solis's avatar
Leonardo Solis committed
435

436
# Execute on remote server
Leonardo Solis's avatar
Leonardo Solis committed
437
438
439
440
441
442
443
# Host-recompilation
# Copy of host to $(TARGET_DIR_HW)
# The working directory is changed
# So .dlg file is written in $(TARGET_DIR_HW)
exe: $(TARGET_DIR)/$(TARGET)
	cp $(TARGET_DIR)/$(TARGET) $(TARGET_DIR_HW)/ && \
	cd $(TARGET_DIR_HW) && \
Leonardo Solis's avatar
Leonardo Solis committed
444
445
446
447
448
	./$(TARGET) \
	-ffile ../input/$(PDB)/derived/$(PDB)_protein.maps.fld \
	-lfile ../input/$(PDB)/derived/$(PDB)_ligand.pdbqt \
	-resnam docking_$(PDB)_$(NRUN) \
	-nrun $(NRUN) -gfpop $(GFPOP)
449
450
451
452
453
	@echo $(newline)
	@echo "========================================================================="
	@echo "INFO: log file is under: \"$(TARGET_DIR_HW)/docking_$(PDB)_$(NRUN).dlg\" "
	@echo "========================================================================="
	@echo $(newline)
Leonardo Solis's avatar
Leonardo Solis committed
454
455


456
# Execute and profile on remote server
Leonardo Solis's avatar
Leonardo Solis committed
457
458
459
460
461
462
463
# Host-recompilation
# Copy of host to $(TARGET_DIR_HW_PROF)
# The working directory is changed
# So .dlg file is written in $(TARGET_DIR_HW_PROF)
exe-prof: $(TARGET_DIR)/$(TARGET)
	cp $(TARGET_DIR)/$(TARGET) $(TARGET_DIR_HW_PROF)/ && \
	cd $(TARGET_DIR_HW_PROF) && \
Leonardo Solis's avatar
Leonardo Solis committed
464
465
466
467
468
	./$(TARGET) \
	-ffile ../input/$(PDB)/derived/$(PDB)_protein.maps.fld \
	-lfile ../input/$(PDB)/derived/$(PDB)_ligand.pdbqt \
	-resnam docking_$(PDB)_$(NRUN) \
	-nrun $(NRUN) -gfpop $(GFPOP)
469
470
471
472
473
	@echo $(newline)
	@echo "=============================================================================="
	@echo "INFO: log file is under: \"$(TARGET_DIR_HW_PROF)/docking_$(PDB)_$(NRUN).dlg\" "
	@echo "=============================================================================="
	@echo $(newline)
Leonardo Solis's avatar
Leonardo Solis committed
474

Leonardo Solis's avatar
Leonardo Solis committed
475
476
COPY_DIR := copy_$(PROJECT_NAME)
COPY_DIR_DOCK := $(PROJECT_NAME)
477

478
# Make sure this remote-server alias exists (in ~/.ssh/config)
479
480
SERVER_BRIDGE := erebor:/scratch/
SERVER_EXEC   := sauron:~/ocladock_only-ga
481

482
# Delete an existing folder if previously created
Leonardo Solis's avatar
Leonardo Solis committed
483
484
# Create a folder $(COPY_DIR) in the parent directory
# Copy binaries into $(COPY_DIR) folder, avoiding the (innecesary) compilation intermediate files
485
# Copy source files into $(COPY_DIR) as host is built in the remote $(SERVER)
Leonardo Solis's avatar
Leonardo Solis committed
486
487
488
489
490
491
# Create a zip file out of the $(COPY_DIR) folder
copy: clean-copy
	mkdir ../$(COPY_DIR)
	mkdir ../$(COPY_DIR)/$(COPY_DIR_DOCK)
	mkdir ../$(COPY_DIR)/$(COPY_DIR_DOCK)/$(TARGET_DIR_HW)
	mkdir ../$(COPY_DIR)/$(COPY_DIR_DOCK)/$(TARGET_DIR_HW_PROF)
Leonardo Solis's avatar
Leonardo Solis committed
492
493
	cp $(TARGET_DIR_HW)/$(KRNL_NAME).* ../$(COPY_DIR)/$(COPY_DIR_DOCK)/$(TARGET_DIR_HW)/
	cp $(TARGET_DIR_HW_PROF)/$(KRNL_NAME).* ../$(COPY_DIR)/$(COPY_DIR_DOCK)/$(TARGET_DIR_HW_PROF)/
Leonardo Solis's avatar
Leonardo Solis committed
494
495
	cp Makefile ../$(COPY_DIR)/$(COPY_DIR_DOCK)/
	cp defines.h ../$(COPY_DIR)/$(COPY_DIR_DOCK)/
496
497
	cp defines_fixedpt.h ../$(COPY_DIR)/$(COPY_DIR_DOCK)/
	cp defines_fixedpt_64.h ../$(COPY_DIR)/$(COPY_DIR_DOCK)/
Leonardo Solis's avatar
Leonardo Solis committed
498
499
500
501
502
	cp -r device/ ../$(COPY_DIR)/$(COPY_DIR_DOCK)/
	cp -r host/ ../$(COPY_DIR)/$(COPY_DIR_DOCK)/
	cp -r input/ ../$(COPY_DIR)/$(COPY_DIR_DOCK)/
	cp -r wrapcl/ ../$(COPY_DIR)/$(COPY_DIR_DOCK)/
	cp -r ../common ../$(COPY_DIR)/
503
	cp ../conf_aoc160_sauron.sh ../$(COPY_DIR)/
Leonardo Solis's avatar
Leonardo Solis committed
504
	cd ../;	zip -r $(COPY_DIR).zip $(COPY_DIR)
505
506
507
	@echo $(newline)
	@echo "Transfer the \"$(COPY_DIR).zip\" file to $(SERVER_BRIDGE) server: "
	@echo $(newline)
508
	cd ../ && scp $(COPY_DIR).zip $(SERVER_BRIDGE)
509
	@echo $(newline)
510
511
	@echo "================================================="
	@echo "Files listed were transferred to $(SERVER_BRIDGE)"
512
	@echo $(newline)
513
514
515
	@echo "Then, transfer files manually                    "
	@echo "from $(SERVER_BRIDGE) to $(SERVER_EXEC)          "
	@echo "================================================="
516
	@echo $(newline)
Leonardo Solis's avatar
Leonardo Solis committed
517

Leonardo Solis's avatar
Leonardo Solis committed
518
519
clean-copy:
	rm -rf ../$(COPY_DIR)
Leonardo Solis's avatar
Leonardo Solis committed
520
	rm -f ../$(COPY_DIR).zip
Leonardo Solis's avatar
Leonardo Solis committed
521

522
523
524
525
526
$(TARGET_DIR) :
	$(ECHO)mkdir $(TARGET_DIR)
	
# Standard make targets
clean :
527
528
529
530
531
532
533
	$(ECHO)rm -f  $(TARGET_DIR)/$(TARGET)
	$(ECHO)rm -rf $(TARGET_DIR)/$(KRNL_NAME)
	$(ECHO)rm -f  $(TARGET_DIR)/$(KRNL_NAME).aocx
	$(ECHO)rm -f  $(TARGET_DIR)/$(KRNL_NAME).aoco
	$(ECHO)rm -f  $(TARGET_DIR)/initpop.txt
	$(ECHO)rm -f  $(TARGET_DIR)/docking.*
	$(ECHO)rm -f  $(TARGET_DIR)/final_population_*
534
	@echo $(newline)
535
536

.PHONY : all clean