clean up .gitignores
[staff/goc4/2018bti7061.git] / makefile
1 # MAKEFILE for the BTI7061 course of the BFH
2 all: asm1 asm2 asm3 asm4 asm5 asm6 asm7 asm8 c1 c2 c3 c4 c5 c6 c7 c8 c9
3
4 clean: cleanAsm1 cleanAsm2 cleanAsm3 cleanAsm4 cleanAsm5 cleanAsm6 cleanAsm7 cleanAsm8\
5 cleanC1 cleanC2 cleanC3 cleanC4 cleanC5 cleanC6 cleanC7 cleanC8 cleanC9
6
7 reset: resetAsm1 resetAsm2 resetAsm3 resetAsm4 resetAsm5 resetAsm6 resetAsm7 resetAsm8\
8 resetC1 resetC2 resetC3 resetC4 resetC5 resetC6 resetC7 resetC8 resetC9
9
10 DESTINATION=../BTI7061classI1P2017
11
12 deploy: copy_slides copy_examples copy_exercise_dirs
13
14 deploy_W2: deploy copy_solution_asm1
15
16 deploy_W3: deploy_W2 copy_solution_asm2
17
18 deploy_W4: deploy_W3 copy_solution_asm3
19
20 deploy_W5: deploy_W4 copy_solution_asm4
21
22 deploy_W6: deploy_W5 copy_solution_asm5
23
24 deploy_W7: deploy_W6 copy_solution_asm6
25
26 deploy_W8: deploy_W7 copy_solution_asm7
27
28 deploy_W9: deploy_W8 copy_solution_asm8
29
30 deploy_W10: deploy_W9 copy_solution_c1
31
32 deploy_W11: deploy_W10 copy_solution_c2
33
34 deploy_W12: deploy_W11 copy_solution_c3
35
36 deploy_W13: deploy_W12 copy_solution_c4
37
38 deploy_W14: deploy_W13 copy_solution_c5
39
40 deploy_W15: deploy_W14 copy_solution_c6
41
42 deploy_W16: deploy_W15 copy_solution_c7
43
44 deploy_Final: deploy_W16 copy_solution_c8
45
46
47
48
49
50
51
52
53
54
55
56 SUFFIXES=*.toc *.nav *.aux *.log *.out *.snm
57
58 # CHAPTER 1 : BASES
59
60 asm1 : asm1slides asm1exercises
61
62 asm1slides: asm-1-bases/slides/slides-bases.pdf asm-1-bases/slides-unicode/slides-unicode.pdf
63
64 asm1exercises: asm-1-bases/exercises/exercises-bases.pdf asm-1-bases/exercises/exercises-bases.sol.pdf
65
66 cleanAsm1:
67 cd asm-1-bases/slides;\
68 rm $(SUFFIXES);\
69 cd ../exercises;\
70 rm $(SUFFIXES)
71
72 asm-1-bases/slides/slides-bases.pdf: asm-1-bases/slides/slides-bases.tex
73 ./compile-latex-plus.sh asm-1-bases/slides slides-bases
74 asm-1-bases/slides-unicode/slides-unicode.pdf: asm-1-bases/slides-unicode/slides-unicode.tex
75 ./compile-latex-plus.sh asm-1-bases/slides-unicode slides-unicode
76
77 asm-1-bases/exercises/exercises-bases.pdf: asm-1-bases/exercises/exercises-bases.tex
78 ./compile-latex.sh asm-1-bases/exercises exercises-bases
79
80 asm-1-bases/exercises/exercises-bases.sol.pdf: asm-1-bases/exercises/exercises-bases.sol.tex
81 ./compile-latex.sh asm-1-bases/exercises exercises-bases.sol
82
83 resetAsm1:
84 touch asm-1-bases/slides/slides-bases.tex
85 touch asm-1-bases/exercises/exercises-bases.tex
86 touch asm-1-bases/exercises/exercises-bases.sol.tex
87
88 # CHAPTER 2 : ARCHITECTURE
89
90 asm2 : asm2slides asm2exercises
91
92 asm2slides: asm-2-architecture/slides/slides-architecture.pdf
93
94 asm2exercises: asm-2-architecture/exercises/exercises-architecture.pdf asm-2-architecture/exercises/exercises-architecture.sol.pdf
95
96 cleanAsm2:
97 cd asm-2-bases/slides;\
98 rm $(SUFFIXES);\
99 cd ../exercises;\
100 rm $(SUFFIXES)
101
102 asm-2-architecture/slides/slides-architecture.pdf: asm-2-architecture/slides/slides-architecture.tex
103 ./compile-latex-plus.sh asm-2-architecture/slides slides-architecture
104
105 asm-2-architecture/exercises/exercises-architecture.pdf: asm-2-architecture/exercises/exercises-architecture.tex
106 ./compile-latex.sh asm-2-architecture/exercises exercises-architecture
107
108 asm-2-architecture/exercises/exercises-architecture.sol.pdf: asm-2-architecture/exercises/exercises-architecture.sol.tex
109 ./compile-latex.sh asm-2-architecture/exercises exercises-architecture.sol
110
111 resetAsm2:
112 touch asm-2-architecture/slides/slides-architecture.tex
113 touch asm-2-architecture/exercises/exercises-architecture.tex
114 touch asm-2-architecture/exercises/exercises-architecture.sol.tex
115
116
117 # CHAPTER 3 : MEMORY
118
119 asm3 : asm3slides asm3exercises
120
121 asm3slides: asm-3-memory/slides/slides-linux.pdf asm-3-memory/slides/slides-memory.pdf
122
123 asm3exercises: asm-3-memory/exercises/exercises-memory.pdf asm-3-memory/exercises/exercises-memory.sol.pdf
124
125 cleanAsm3:
126 cd asm-3-memory/slides;\
127 rm $(SUFFIXES);\
128 cd ../exercises;\
129 rm $(SUFFIXES)
130
131 asm-3-memory/slides/slides-memory.pdf: asm-3-memory/slides/slides-memory.tex
132 ./compile-latex-plus.sh asm-3-memory/slides slides-memory
133
134 asm-3-memory/slides/slides-linux.pdf: asm-3-memory/slides/slides-linux.tex
135 ./compile-latex-plus.sh asm-3-memory/slides slides-linux
136
137 asm-3-memory/exercises/exercises-memory.pdf: asm-3-memory/exercises/exercises-memory.tex
138 ./compile-latex.sh asm-3-memory/exercises exercises-memory
139
140 asm-3-memory/exercises/exercises-memory.sol.pdf: asm-3-memory/exercises/exercises-memory.sol.tex
141 ./compile-latex.sh asm-3-memory/exercises exercises-memory.sol
142
143 resetAsm3:
144 touch asm-3-memory/slides/slides-memory.tex
145 touch asm-3-memory/slides/slides-linux.tex
146 touch asm-3-memory/exercises/exercises-memory.tex
147 touch asm-3-memory/exercises/exercises-memory.sol.tex
148
149
150 # CHAPTER 4 : CODIFICATION
151 asm4 : asm4slides asm4exercises
152
153 asm4slides: asm-4-codification/slides/slides-developmentProcess.pdf
154
155 asm4exercises: asm-4-codification/exercises/exercises-codification.pdf asm-4-codification/exercises/exercises-codification.sol.pdf
156
157 cleanAsm4:
158 cd asm-4-codification/slides;\
159 rm $(SUFFIXES);\
160 cd ../exercises;\
161 rm $(SUFFIXES)
162
163 asm-4-codification/slides/slides-developmentProcess.pdf: asm-4-codification/slides/slides-developmentProcess.tex
164 ./compile-latex-plus.sh asm-4-codification/slides slides-developmentProcess
165
166 asm-4-codification/exercises/exercises-codification.pdf: asm-4-codification/exercises/exercises-codification.tex asm-4-codification/exercises/data-codification.tex
167 ./compile-latex.sh asm-4-codification/exercises exercises-codification
168
169 asm-4-codification/exercises/exercises-codification.sol.pdf: asm-4-codification/exercises/exercises-codification.sol.tex asm-4-codification/exercises/data-codification.tex
170 ./compile-latex.sh asm-4-codification/exercises exercises-codification.sol
171
172 resetAsm4:
173 touch asm-4-codification/slides/slides-developmentProcess.tex
174 touch asm-4-codification/exercises/exercises-codification.tex
175 touch asm-4-codification/exercises/exercises-codification.sol.tex
176
177
178 # CHAPTER 5 : PROGRAMMING
179
180 asm5 : asm5slides asm5exercises
181
182 asm5slides: asm-5-programming/slides/slides-assemblerProgramming.pdf
183
184 asm5exercises: asm-5-programming/exercises/exercises-programming.pdf asm-5-programming/exercises/exercise-programming2.pdf
185
186 cleanAsm5:
187 cd asm-5-programming/slides;\
188 rm $(SUFFIXES);\
189 cd ../exercises;\
190 rm $(SUFFIXES)
191
192 asm-5-programming/slides/slides-assemblerProgramming.pdf: asm-5-programming/slides/slides-assemblerProgramming.tex
193 ./compile-latex-plus.sh asm-5-programming/slides slides-assemblerProgramming
194
195
196 asm-5-programming/exercises/exercises-programming.pdf: asm-5-programming/exercises/exercises-programming.tex
197 ./compile-latex.sh asm-5-programming/exercises exercises-programming
198
199 asm-5-programming/exercises/exercise-programming2.pdf: asm-5-programming/exercises/exercise-programming2.tex
200 ./compile-latex.sh asm-5-programming/exercises exercise-programming2
201
202
203 resetAsm5:
204 touch asm-5-programming/slides/slides-assemblerProgramming.tex
205 touch asm-5-programming/exercises/exercises-programming.tex
206 touch asm-5-programming/exercises/exercises-programming.sol.tex
207
208 # CHAPTER 6 : BITS AND BRANCHINGS
209
210 asm6 : asm6slides asm6exercises
211
212 asm6slides: asm-6-bits-branching/slides/slides-bits-branching.pdf
213
214 asm6exercises: asm-6-bits-branching/exercises/exercises-bits-branching.pdf asm-6-bits-branching/exercises/exercises-bits-branching.sol.pdf
215
216 cleanAsm6:
217 cd asm-6-bits-branching/slides;\
218 rm $(SUFFIXES);\
219 cd ../exercises;\
220 rm $(SUFFIXES)
221
222 asm-6-bits-branching/slides/slides-bits-branching.pdf: asm-6-bits-branching/slides/slides-bits-branching.tex
223 ./compile-latex-plus.sh asm-6-bits-branching/slides slides-bits-branching
224
225 asm-6-bits-branching/exercises/exercises-bits-branching.pdf: asm-6-bits-branching/exercises/exercises-bits-branching.tex
226 ./compile-latex.sh asm-6-bits-branching/exercises exercises-bits-branching
227
228 asm-6-bits-branching/exercises/exercises-bits-branching.sol.pdf: asm-6-bits-branching/exercises/exercises-bits-branching.sol.tex
229 ./compile-latex.sh asm-6-bits-branching/exercises exercises-bits-branching.sol
230
231
232 resetAsm6:
233 touch asm-6-bits-branching/slides/slides-bits-branching.tex
234 touch asm-6-bits-branching/exercises/exercises-bits-branching.tex
235 touch asm-6-bits-branching/exercises/exercises-bits-branching.sol.tex
236
237
238
239 # CHAPTER 7 : PROCEDURES
240
241 asm7: asm7slides asm7exercises
242
243 asm7slides: asm-7-procedures/slides/slides-procedures.pdf
244
245 asm7exercises: asm-7-procedures/exercises/exercises-procedures.pdf
246
247 cleanAsm7:
248 cd asm-7-procedures/slides;\
249 rm $(SUFFIXES);\
250 cd ../exercises;\
251 rm $(SUFFIXES)
252
253 asm-7-procedures/slides/slides-procedures.pdf: asm-7-procedures/slides/slides-procedures.tex
254 ./compile-latex-plus.sh asm-7-procedures/slides slides-procedures
255
256 asm-7-procedures/exercises/exercises-procedures.pdf: asm-7-procedures/exercises/exercises-procedures.tex
257 ./compile-latex.sh asm-7-procedures/exercises exercises-procedures
258
259
260
261 resetAsm7:
262 touch asm-7-procedures/slides/slides-procedures.tex
263 touch asm-7-procedures/exercises/exercises-procedures.tex
264
265 # CHAPTER 8 : STRINGS
266
267 asm8: asm8slides asm8exercises
268
269 asm8slides: asm-8-strings/slides/slides-strings.pdf
270
271 asm8exercises: asm-8-strings/exercises/exercises-strings.pdf asm-8-strings/exercises/exercises-strings.sol.pdf
272
273 cleanAsm8:
274 cd asm-8-strings/slides;\
275 rm $(SUFFIXES);\
276 cd ../exercises;\
277 rm $(SUFFIXES)
278
279 asm-8-strings/slides/slides-strings.pdf: asm-8-strings/slides/slides-strings.tex
280 ./compile-latex-plus.sh asm-8-strings/slides slides-strings
281
282 asm-8-strings/exercises/exercises-strings.pdf: asm-8-strings/exercises/exercises-strings.tex
283 ./compile-latex.sh asm-8-strings/exercises exercises-strings
284
285 asm-8-strings/exercises/exercises-strings.sol.pdf: asm-8-strings/exercises/exercises-strings.sol.tex
286 ./compile-latex.sh asm-8-strings/exercises exercises-strings.sol
287
288
289 resetAsm8:
290 touch asm-8-strings/slides/slides-strings.tex
291 touch asm-8-strings/exercises/exercises-strings.tex
292 touch asm-8-strings/exercises/exercises-strings.sol.tex
293
294 # CHAPTER C-1 : BASICS
295
296 c1: c1slides c1exercises
297
298 c1slides: c-1-basics/slides/slides-basics.pdf
299
300 c1exercises: c-1-basics/exercises/exercises-basics.pdf
301
302 cleanC1:
303 cd c-1-basics/slides;\
304 rm *.toc *.nav *.aux *.log *.out *.snm *~;\
305 cd ../exercises;\
306 rm *.toc *.nav *.aux *.log *.out *.snm *~
307
308 c-1-basics/slides/slides-basics.pdf: c-1-basics/slides/slides-basics.tex
309 ./compile-latex-plus.sh c-1-basics/slides slides-basics
310
311 c-1-basics/exercises/exercises-basics.pdf: c-1-basics/exercises/exercises-basics.tex
312 ./compile-latex.sh c-1-basics/exercises exercises-basics
313
314 resetC1:
315 touch c-1-basics/slides/slides-basics.tex
316 touch c-1-basics/exercises/exercises-basics.tex
317
318
319 # CHAPTER C-2 : CONTROL STRUCTURES in C
320
321 c2: c2slides c2exercises
322
323 c2slides: c-2-controlStructures/slides/slides-cControlStructures.pdf
324
325 c2exercises: c-2-controlStructures/exercises/exercises-cControlStructures.pdf
326
327 cleanC2:
328 cd c-2-controlStructures/slides;\
329 rm *.toc *.nav *.aux *.log *.out *.snm *~;\
330 cd ../exercises;\
331 rm *.toc *.nav *.aux *.log *.out *.snm *~
332
333 c-2-controlStructures/slides/slides-cControlStructures.pdf: c-2-controlStructures/slides/slides-cControlStructures.tex
334 ./compile-latex-plus.sh c-2-controlStructures/slides slides-cControlStructures
335
336 c-2-controlStructures/exercises/exercises-cControlStructures.pdf: c-2-controlStructures/exercises/exercises-cControlStructures.tex
337 ./compile-latex.sh c-2-controlStructures/exercises exercises-cControlStructures
338
339 resetC2:
340 touch c-2-controlStructures/slides/slides-cControlStructures.tex
341 touch c-2-controlStructures/exercises/exercises-cControlStructures.tex
342
343
344 # CHAPTER C-3 : LIBRARIES in C
345
346 c3: c3slides c3exercises
347
348 c3slides: c-3-libraries/slides/slides-libraries.pdf
349
350 c3exercises: c-3-libraries/exercises/exercises-libraries.pdf
351
352 cleanC3:
353 cd c-3-libraries/slides;\
354 rm *.toc *.nav *.aux *.log *.out *.snm *~;\
355 cd ../exercises;\
356 rm *.toc *.nav *.aux *.log *.out *.snm *~
357
358 c-3-libraries/slides/slides-libraries.pdf: c-3-libraries/slides/slides-libraries.tex
359 ./compile-latex-plus.sh c-3-libraries/slides slides-libraries
360
361 c-3-libraries/exercises/exercises-libraries.pdf: c-3-libraries/exercises/exercises-libraries.tex
362 ./compile-latex.sh c-3-libraries/exercises exercises-libraries
363
364 resetC3:
365 touch c-3-libraries/slides/slides-libraries.tex
366 touch c-3-libraries/exercises/exercises-libraries.tex
367
368 # CHAPTER C-4 : POINTERS
369
370 c4: c4slides c4exercises
371
372 c4slides: c-4-pointers/slides/slides-pointers.pdf
373
374 c4exercises: c-4-pointers/exercises/exercises-pointers.pdf
375
376 cleanC4:
377 cd c-4-pointers/slides;\
378 rm *.toc *.nav *.aux *.log *.out *.snm *~;\
379 cd ../exercises;\
380 rm *.toc *.nav *.aux *.log *.out *.snm *~
381
382 c-4-pointers/slides/slides-pointers.pdf: c-4-pointers/slides/slides-pointers.tex
383 ./compile-latex-plus.sh c-4-pointers/slides slides-pointers
384
385 c-4-pointers/exercises/exercises-pointers.pdf: c-4-pointers/exercises/exercises-pointers.tex
386 ./compile-latex.sh c-4-pointers/exercises exercises-pointers
387
388 resetC4:
389 touch c-4-pointers/slides/slides-pointers.tex
390 touch c-4-pointers/exercises/exercises-pointers.tex
391
392
393 # CHAPTER C-5 : POINTERS
394
395 c5: c5slides c5exercises
396
397 c5slides: c-5-structuresFiles/slides/slides-structuresFiles.pdf
398
399 c5exercises: c-5-structuresFiles/exercises/exercises-structuresFiles.pdf
400
401 cleanC5:
402 cd c-5-structuresFiles/slides;\
403 rm *.toc *.nav *.aux *.log *.out *.snm *~;\
404 cd ../exercises;\
405 rm *.toc *.nav *.aux *.log *.out *.snm *~
406
407 c-5-structuresFiles/slides/slides-structuresFiles.pdf: c-5-structuresFiles/slides/slides-structuresFiles.tex
408 ./compile-latex-plus.sh c-5-structuresFiles/slides slides-structuresFiles
409
410 c-5-structuresFiles/exercises/exercises-structuresFiles.pdf: c-5-structuresFiles/exercises/exercises-structuresFiles.tex
411 ./compile-latex.sh c-5-structuresFiles/exercises exercises-structuresFiles
412
413 resetC5:
414 touch c-5-structuresFiles/slides/slides-structuresFiles.tex
415 touch c-5-structuresFiles/exercises/exercises-structuresFiles.tex
416
417 # CHAPTER C-6 : ADDITIONAL
418
419 c6: c6slides c6exercises
420
421 c6slides: c-6-additional/slides/slides-cAdditional.pdf
422
423 c6exercises: c-6-additional/exercises/exercises-additional.pdf
424
425 cleanC6:
426 cd c-6-additional/slides;\
427 rm *.toc *.nav *.aux *.log *.out *.snm *~;\
428 cd ../exercises;\
429 rm *.toc *.nav *.aux *.log *.out *.snm *~
430
431 c-6-additional/slides/slides-cAdditional.pdf: c-6-additional/slides/slides-cAdditional.tex
432 ./compile-latex-plus.sh c-6-additional/slides slides-cAdditional
433
434 c-6-additional/exercises/exercises-additional.pdf: c-6-additional/exercises/exercises-additional.tex
435 ./compile-latex.sh c-6-additional/exercises exercises-additional
436
437 resetC6:
438 touch c-6-additional/slides/slides-cAdditional.tex
439 touch c-6-additional/exercises/exercises-additional.tex
440
441
442 # CHAPTER C-7 : COMPILATION
443
444 c7: c7slides c7exercises
445
446 c7slides: c-7-compilation/slides/slides-cCompilation.pdf
447
448 c7exercises: c-7-compilation/exercises/exercises-compilation.pdf
449
450 cleanC7:
451 cd c-7-compilation/slides;\
452 rm *.toc *.nav *.aux *.log *.out *.snm *~;\
453 cd ../exercises;\
454 rm *.toc *.nav *.aux *.log *.out *.snm *~
455
456 c-7-compilation/slides/slides-cCompilation.pdf: c-7-compilation/slides/slides-cCompilation.tex
457 ./compile-latex-plus.sh c-7-compilation/slides slides-cCompilation
458
459 c-7-compilation/exercises/exercises-compilation.pdf: c-7-compilation/exercises/exercises-compilation.tex
460 ./compile-latex.sh c-7-compilation/exercises exercises-compilation
461
462 resetC7:
463 touch c-7-compilation/slides/slides-cCompilation.tex
464 touch c-7-compilation/exercises/exercises-compilation.tex
465
466
467 # CHAPTER C-8 : API
468
469 c8: c8slides
470
471 c8slides: c-8-api/slides/slides-cAPI.pdf
472
473 cleanC8:
474 cd c-8-compilation/slides;\
475 rm *.toc *.nav *.aux *.log *.out *.snm *~;\
476
477 c-8-api/slides/slides-cAPI.pdf: c-8-api/slides/slides-cAPI.tex
478 ./compile-latex-plus.sh c-8-api/slides slides-cAPI
479
480 resetC8:
481 touch c-8-compilation/slides/slides-cAPI.tex
482
483
484 # CHAPTER C-9 : Tools
485
486 c9: c9slides
487
488 c9slides: c-9-tools/slides/slides-cTools.pdf
489
490 cleanC9:
491 cd c-9-compilation/slides;\
492 rm *.toc *.nav *.aux *.log *.out *.snm *~;\
493
494 c-9-tools/slides/slides-cTools.pdf: c-9-tools/slides/slides-cTools.tex
495 ./compile-latex-plus.sh c-9-tools/slides slides-cTools
496
497 resetC9:
498 touch c-9-compilation/slides/slides-cTools.tex
499
500 # Transfert PDF's
501 # I was just trying, it still does not work properly
502 # DESTDIR := ../BTI7061intern/
503 # FILES := asm-1-bases/slides/slides-bases.pdf
504 # DST_FILES := $(addprefix $(DESTDIR)/,$(FILES))
505
506 # SLIDES=$(wildcard */slides/slides*.pdf)
507 # DEST:=$(addprefix '../BTI7061intern/', $(SLIDES))
508 # transfert_master : $(DST_FILES)
509
510 # deploy_master: $(DEST)
511
512 # $(DEST): $(SLIDES)
513 # @echo copying $< to $@
514
515 # $(DST_FILES) : ${DESTDIR}/% : %
516 # @echo "$< ==> $@"
517 # @[[ -e $< ]] || (echo "some error for $<" && false)
518 # @mkdir -p $(dir $@)
519 # @cp $< $@
520
521
522
523 ASM_DIRS = asm-1-bases asm-2-architecture asm-3-memory asm-4-codification\
524 asm-5-programming asm-6-bits-branching asm-7-procedures asm-8-strings
525 C_DIRS = c-1-basics c-2-controlStructures c-3-libraries c-4-pointers\
526 c-5-structuresFiles c-6-additional c-7-compilation
527
528 DIRS = $(ASM_DIRS) $(C_DIRS)
529
530 # Names without suffixes of LaTeX files (and also pdf)
531 ASM_BASES = asm-1-bases/slides/slides-bases\
532 asm-2-architecture/slides/slides-architecture\
533 asm-3-memory/slides/slides-memory\
534 asm-3-memory/slides/slides-linux\
535 asm-4-codification/slides/slides-developmentProcess\
536 asm-5-programming/slides/slides-assemblerProgramming\
537 asm-6-bits-branching/slides/slides-bits-branching\
538 asm-7-procedures/slides/slides-procedures\
539 asm-8-strings/slides/slides-strings
540
541 C_BASES = c-1-basics/slides/slides-basics\
542 c-2-controlStructures/slides/slides-cControlStructures\
543 c-3-libraries/slides/slides-libraries\
544 c-4-pointers/slides/slides-pointers\
545 c-5-structuresFiles/slides/slides-structuresFiles\
546 c-6-additional/slides/slides-cAdditional\
547 c-7-compilation/slides/slides-cCompilation\
548 c-8-compilation/slides/slides-cAPI\
549 c-9-compilation/slides/slides-cTools
550
551
552 ASM_EXERCISES = asm-1-bases/exercises/exercises-bases.pdf\
553 asm-2-architecture/exercises/exercises-architecture.pdf \
554 asm-3-memory/exercises/exercises-memory.pdf\
555 asm-4-codification/exercises/exercises-codification.pdf\
556 asm-5-programming/exercises/exercises-programming.pdf \
557 asm-5-programming/exercises/exercise-programming2.pdf \
558 asm-6-bits-branching/exercises/exercises-bits-branching.pdf\
559 asm-7-procedures/exercises/exercises-procedures.pdf\
560 asm-8-strings/exercises/exercises-strings.pdf
561
562 C_EXERCISES = c-1-basics/exercises/exercises-basics.pdf\
563 c-2-controlStructures/exercises/exercises-cControlStructures.pdf\
564 c-3-libraries/exercises/exercises-libraries.pdf\
565 c-4-pointers/exercises/exercises-pointers.pdf\
566 c-5-structuresFiles/exercises/exercises-structuresFiles.pdf\
567 c-6-additional/exercises/exercises-additional.pdf\
568 c-7-compilation/exercises/exercises-compilation.pdf
569
570 # Directories contining Data for the exercises.
571 ASM_EXO_DIRS = asm-2-architecture/exercises/images/\
572 asm-3-memory/exercises/resources/\
573 asm-5-memory/exercises/helloWorld/\
574 asm-5-memory/exercises/eatsyscall/\
575 asm-6-bits-branching/exercises/hexdump1/
576
577
578 ASM_EXAMPLES = asm-4-codification/examples/\
579 asm-5-programming/examples/\
580 asm-6-bits-branching/examples/\
581 asm-7-procedures/examples/\
582 asm-8-strings/examples/
583
584 ASM_SLIDES :=$(addsuffix '.pdf', $(ASM_BASES))
585 ASM_SLIDES_2x2 := $(addsuffix '-2x2.pdf', $(ASM_BASES))
586 C_SLIDES :=$(addsuffix '.pdf', $(C_BASES))
587 C_SLIDES_2x2 := $(addsuffix '-2x2.pdf', $(C_BASES))
588 C_EXAMPLES := $(addsuffix '/examples/', $(C_DIRS))
589
590
591 ASM_DOCS = $(ASM_SLIDES) $(ASM_SLIDES_2x2) $(C_SLIDES) $(C_SLIDES_2x2)\
592 $(ASM_EXERCISES) $(C_EXERCISES)
593
594 EXAMPLES = $(ASM_EXAMPLES) $(C_EXAMPLES)
595
596
597 # Should be used only to initialize the directory structure if the repository is empty
598 init_dirs:
599 for directory in $(DIRS); do\
600 echo mkdir $(DESTINATION)/$$directory;\
601 mkdir $(DESTINATION)/$$directory;\
602 mkdir $(DESTINATION)/$$directory/slides;\
603 mkdir $(DESTINATION)/$$directory/exercises;\
604 mkdir $(DESTINATION)/$$directory/examples;\
605 done
606
607 copy_slides:
608 for file in $(ASM_DOCS); do\
609 echo cp $$file $(DESTINATION)/$$file;\
610 cp $$file $(DESTINATION)/$$file;\
611 done
612
613 copy_examples:
614 for directory in $(EXAMPLES); do\
615 echo cp -r $$directory $(DESTINATION)/$$directory;\
616 cp -r $$directory $(DESTINATION)/$$directory;\
617 done
618
619 copy_exercise_dirs:
620 for directory in $(ASM_EXO_DIRS); do\
621 echo cp -r $$directory $(DESTINATION)/$$directory;\
622 cp -r $$directory $(DESTINATION)/$$directory;\
623 done
624
625
626 SOLUTION_ASM1=asm-1-bases/exercises/exercises-bases.sol.pdf
627 copy_solution_asm1:
628 echo "copy solution ASM 1";
629 for directory in $(SOLUTION_ASM1); do\
630 echo cp -r $$directory $(DESTINATION)/$$directory;\
631 cp -r $$directory $(DESTINATION)/$$directory;\
632 done
633
634 SOLUTION_ASM2=asm-2-architecture/exercises/exercises-architecture.sol.pdf
635 copy_solution_asm2:
636 echo "copy solution ASM 2";
637 for directory in $(SOLUTION_ASM2); do\
638 echo cp -r $$directory $(DESTINATION)/$$directory;\
639 cp -r $$directory $(DESTINATION)/$$directory;\
640 done
641
642 SOLUTION_ASM3=asm-3-memory/exercises/exercises-memory.sol.pdf
643 copy_solution_asm3:
644 echo "copy solution ASM 3";
645 for directory in $(SOLUTION_ASM3); do\
646 echo cp -r $$directory $(DESTINATION)/$$directory;\
647 cp -r $$directory $(DESTINATION)/$$directory;\
648 done
649
650 SOLUTION_ASM4=asm-4-codification/exercises/exercises-codification.sol.pdf
651 copy_solution_asm4:
652 echo "copy solution ASM 4";
653 for directory in $(SOLUTION_ASM4); do\
654 echo cp -r $$directory $(DESTINATION)/$$directory;\
655 cp -r $$directory $(DESTINATION)/$$directory;\
656 done
657
658
659 SOLUTION_ASM5=asm-5-programming/exercises/exercise1/ asm-5-programming/exercises/exercise2/
660 copy_solution_asm5:
661 echo "copy solution ASM 5";
662 for directory in $(SOLUTION_ASM5); do\
663 echo cp -r $$directory $(DESTINATION)/$$directory;\
664 cp -r $$directory $(DESTINATION)/$$directory;\
665 done
666
667 SOLUTION_ASM6=asm-6-bits-branching/exercises/logarithm/
668 copy_solution_asm6:
669 echo "copy solution ASM 6";
670 for directory in $(SOLUTION_ASM6); do\
671 echo cp -r $$directory $(DESTINATION)/$$directory;\
672 cp -r $$directory $(DESTINATION)/$$directory;\
673 done
674
675
676 SOLUTION_ASM7=asm-7-procedures/exercises/exercise-procedures/
677 copy_solution_asm7:
678 echo "copy solution ASM 7";
679 for directory in $(SOLUTION_ASM7); do\
680 echo cp -r $$directory $(DESTINATION)/$$directory;\
681 cp -r $$directory $(DESTINATION)/$$directory;\
682 done
683
684
685 SOLUTION_ASM8=asm-8-strings/exercises/exercise-strings/
686 copy_solution_asm8:
687 echo "copy solution ASM 8";
688 for directory in $(SOLUTION_ASM8); do\
689 echo cp -r $$directory $(DESTINATION)/$$directory;\
690 cp -r $$directory $(DESTINATION)/$$directory;\
691 done