initial import
[staff/goc4/2018bti7061.git] / makefile
CommitLineData
462e967d
CG
1# MAKEFILE for the BTI7061 course of the BFH
2all: asm1 asm2 asm3 asm4 asm5 asm6 asm7 asm8 c1 c2 c3 c4 c5 c6 c7 c8 c9
3
4clean: cleanAsm1 cleanAsm2 cleanAsm3 cleanAsm4 cleanAsm5 cleanAsm6 cleanAsm7 cleanAsm8\
5cleanC1 cleanC2 cleanC3 cleanC4 cleanC5 cleanC6 cleanC7 cleanC8 cleanC9
6
7reset: resetAsm1 resetAsm2 resetAsm3 resetAsm4 resetAsm5 resetAsm6 resetAsm7 resetAsm8\
8resetC1 resetC2 resetC3 resetC4 resetC5 resetC6 resetC7 resetC8 resetC9
9
10DESTINATION=../BTI7061classI1P2017
11
12deploy: copy_slides copy_examples copy_exercise_dirs
13
14deploy_W2: deploy copy_solution_asm1
15
16deploy_W3: deploy_W2 copy_solution_asm2
17
18deploy_W4: deploy_W3 copy_solution_asm3
19
20deploy_W5: deploy_W4 copy_solution_asm4
21
22deploy_W6: deploy_W5 copy_solution_asm5
23
24deploy_W7: deploy_W6 copy_solution_asm6
25
26deploy_W8: deploy_W7 copy_solution_asm7
27
28deploy_W9: deploy_W8 copy_solution_asm8
29
30deploy_W10: deploy_W9 copy_solution_c1
31
32deploy_W11: deploy_W10 copy_solution_c2
33
34deploy_W12: deploy_W11 copy_solution_c3
35
36deploy_W13: deploy_W12 copy_solution_c4
37
38deploy_W14: deploy_W13 copy_solution_c5
39
40deploy_W15: deploy_W14 copy_solution_c6
41
42deploy_W16: deploy_W15 copy_solution_c7
43
44deploy_Final: deploy_W16 copy_solution_c8
45
46
47
48
49
50
51
52
53
54
55
56SUFFIXES=*.toc *.nav *.aux *.log *.out *.snm
57
58# CHAPTER 1 : BASES
59
60asm1 : asm1slides asm1exercises
61
62asm1slides: asm-1-bases/slides/slides-bases.pdf asm-1-bases/slides-unicode/slides-unicode.pdf
63
64asm1exercises: asm-1-bases/exercises/exercises-bases.pdf asm-1-bases/exercises/exercises-bases.sol.pdf
65
66cleanAsm1:
67 cd asm-1-bases/slides;\
68 rm $(SUFFIXES);\
69 cd ../exercises;\
70 rm $(SUFFIXES)
71
72asm-1-bases/slides/slides-bases.pdf: asm-1-bases/slides/slides-bases.tex
73 ./compile-latex-plus.sh asm-1-bases/slides slides-bases
74asm-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
77asm-1-bases/exercises/exercises-bases.pdf: asm-1-bases/exercises/exercises-bases.tex
78 ./compile-latex.sh asm-1-bases/exercises exercises-bases
79
80asm-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
83resetAsm1:
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
90asm2 : asm2slides asm2exercises
91
92asm2slides: asm-2-architecture/slides/slides-architecture.pdf
93
94asm2exercises: asm-2-architecture/exercises/exercises-architecture.pdf asm-2-architecture/exercises/exercises-architecture.sol.pdf
95
96cleanAsm2:
97 cd asm-2-bases/slides;\
98 rm $(SUFFIXES);\
99 cd ../exercises;\
100 rm $(SUFFIXES)
101
102asm-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
105asm-2-architecture/exercises/exercises-architecture.pdf: asm-2-architecture/exercises/exercises-architecture.tex
106 ./compile-latex.sh asm-2-architecture/exercises exercises-architecture
107
108asm-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
111resetAsm2:
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
119asm3 : asm3slides asm3exercises
120
121asm3slides: asm-3-memory/slides/slides-linux.pdf asm-3-memory/slides/slides-memory.pdf
122
123asm3exercises: asm-3-memory/exercises/exercises-memory.pdf asm-3-memory/exercises/exercises-memory.sol.pdf
124
125cleanAsm3:
126 cd asm-3-memory/slides;\
127 rm $(SUFFIXES);\
128 cd ../exercises;\
129 rm $(SUFFIXES)
130
131asm-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
134asm-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
137asm-3-memory/exercises/exercises-memory.pdf: asm-3-memory/exercises/exercises-memory.tex
138 ./compile-latex.sh asm-3-memory/exercises exercises-memory
139
140asm-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
143resetAsm3:
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
151asm4 : asm4slides asm4exercises
152
153asm4slides: asm-4-codification/slides/slides-developmentProcess.pdf
154
155asm4exercises: asm-4-codification/exercises/exercises-codification.pdf asm-4-codification/exercises/exercises-codification.sol.pdf
156
157cleanAsm4:
158 cd asm-4-codification/slides;\
159 rm $(SUFFIXES);\
160 cd ../exercises;\
161 rm $(SUFFIXES)
162
163asm-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
166asm-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
169asm-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
172resetAsm4:
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
180asm5 : asm5slides asm5exercises
181
182asm5slides: asm-5-programming/slides/slides-assemblerProgramming.pdf
183
184asm5exercises: asm-5-programming/exercises/exercises-programming.pdf asm-5-programming/exercises/exercise-programming2.pdf
185
186cleanAsm5:
187 cd asm-5-programming/slides;\
188 rm $(SUFFIXES);\
189 cd ../exercises;\
190 rm $(SUFFIXES)
191
192asm-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
196asm-5-programming/exercises/exercises-programming.pdf: asm-5-programming/exercises/exercises-programming.tex
197 ./compile-latex.sh asm-5-programming/exercises exercises-programming
198
199asm-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
203resetAsm5:
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
210asm6 : asm6slides asm6exercises
211
212asm6slides: asm-6-bits-branching/slides/slides-bits-branching.pdf
213
214asm6exercises: asm-6-bits-branching/exercises/exercises-bits-branching.pdf asm-6-bits-branching/exercises/exercises-bits-branching.sol.pdf
215
216cleanAsm6:
217 cd asm-6-bits-branching/slides;\
218 rm $(SUFFIXES);\
219 cd ../exercises;\
220 rm $(SUFFIXES)
221
222asm-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
225asm-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
228asm-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
232resetAsm6:
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
241asm7: asm7slides asm7exercises
242
243asm7slides: asm-7-procedures/slides/slides-procedures.pdf
244
245asm7exercises: asm-7-procedures/exercises/exercises-procedures.pdf
246
247cleanAsm7:
248 cd asm-7-procedures/slides;\
249 rm $(SUFFIXES);\
250 cd ../exercises;\
251 rm $(SUFFIXES)
252
253asm-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
256asm-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
261resetAsm7:
262 touch asm-7-procedures/slides/slides-procedures.tex
263 touch asm-7-procedures/exercises/exercises-procedures.tex
264
265# CHAPTER 8 : STRINGS
266
267asm8: asm8slides asm8exercises
268
269asm8slides: asm-8-strings/slides/slides-strings.pdf
270
271asm8exercises: asm-8-strings/exercises/exercises-strings.pdf asm-8-strings/exercises/exercises-strings.sol.pdf
272
273cleanAsm8:
274 cd asm-8-strings/slides;\
275 rm $(SUFFIXES);\
276 cd ../exercises;\
277 rm $(SUFFIXES)
278
279asm-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
282asm-8-strings/exercises/exercises-strings.pdf: asm-8-strings/exercises/exercises-strings.tex
283 ./compile-latex.sh asm-8-strings/exercises exercises-strings
284
285asm-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
289resetAsm8:
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
296c1: c1slides c1exercises
297
298c1slides: c-1-basics/slides/slides-basics.pdf
299
300c1exercises: c-1-basics/exercises/exercises-basics.pdf
301
302cleanC1:
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
308c-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
311c-1-basics/exercises/exercises-basics.pdf: c-1-basics/exercises/exercises-basics.tex
312 ./compile-latex.sh c-1-basics/exercises exercises-basics
313
314resetC1:
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
321c2: c2slides c2exercises
322
323c2slides: c-2-controlStructures/slides/slides-cControlStructures.pdf
324
325c2exercises: c-2-controlStructures/exercises/exercises-cControlStructures.pdf
326
327cleanC2:
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
333c-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
336c-2-controlStructures/exercises/exercises-cControlStructures.pdf: c-2-controlStructures/exercises/exercises-cControlStructures.tex
337 ./compile-latex.sh c-2-controlStructures/exercises exercises-cControlStructures
338
339resetC2:
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
346c3: c3slides c3exercises
347
348c3slides: c-3-libraries/slides/slides-libraries.pdf
349
350c3exercises: c-3-libraries/exercises/exercises-libraries.pdf
351
352cleanC3:
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
358c-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
361c-3-libraries/exercises/exercises-libraries.pdf: c-3-libraries/exercises/exercises-libraries.tex
362 ./compile-latex.sh c-3-libraries/exercises exercises-libraries
363
364resetC3:
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
370c4: c4slides c4exercises
371
372c4slides: c-4-pointers/slides/slides-pointers.pdf
373
374c4exercises: c-4-pointers/exercises/exercises-pointers.pdf
375
376cleanC4:
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
382c-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
385c-4-pointers/exercises/exercises-pointers.pdf: c-4-pointers/exercises/exercises-pointers.tex
386 ./compile-latex.sh c-4-pointers/exercises exercises-pointers
387
388resetC4:
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
395c5: c5slides c5exercises
396
397c5slides: c-5-structuresFiles/slides/slides-structuresFiles.pdf
398
399c5exercises: c-5-structuresFiles/exercises/exercises-structuresFiles.pdf
400
401cleanC5:
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
407c-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
410c-5-structuresFiles/exercises/exercises-structuresFiles.pdf: c-5-structuresFiles/exercises/exercises-structuresFiles.tex
411 ./compile-latex.sh c-5-structuresFiles/exercises exercises-structuresFiles
412
413resetC5:
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
419c6: c6slides c6exercises
420
421c6slides: c-6-additional/slides/slides-cAdditional.pdf
422
423c6exercises: c-6-additional/exercises/exercises-additional.pdf
424
425cleanC6:
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
431c-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
434c-6-additional/exercises/exercises-additional.pdf: c-6-additional/exercises/exercises-additional.tex
435 ./compile-latex.sh c-6-additional/exercises exercises-additional
436
437resetC6:
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
444c7: c7slides c7exercises
445
446c7slides: c-7-compilation/slides/slides-cCompilation.pdf
447
448c7exercises: c-7-compilation/exercises/exercises-compilation.pdf
449
450cleanC7:
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
456c-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
459c-7-compilation/exercises/exercises-compilation.pdf: c-7-compilation/exercises/exercises-compilation.tex
460 ./compile-latex.sh c-7-compilation/exercises exercises-compilation
461
462resetC7:
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
469c8: c8slides
470
471c8slides: c-8-api/slides/slides-cAPI.pdf
472
473cleanC8:
474 cd c-8-compilation/slides;\
475 rm *.toc *.nav *.aux *.log *.out *.snm *~;\
476
477c-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
480resetC8:
481 touch c-8-compilation/slides/slides-cAPI.tex
482
483
484# CHAPTER C-9 : Tools
485
486c9: c9slides
487
488c9slides: c-9-tools/slides/slides-cTools.pdf
489
490cleanC9:
491 cd c-9-compilation/slides;\
492 rm *.toc *.nav *.aux *.log *.out *.snm *~;\
493
494c-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
497resetC9:
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
523ASM_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
525C_DIRS = c-1-basics c-2-controlStructures c-3-libraries c-4-pointers\
526 c-5-structuresFiles c-6-additional c-7-compilation
527
528DIRS = $(ASM_DIRS) $(C_DIRS)
529
530# Names without suffixes of LaTeX files (and also pdf)
531ASM_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
541C_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
552ASM_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
562C_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.
571ASM_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
578ASM_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
584ASM_SLIDES :=$(addsuffix '.pdf', $(ASM_BASES))
585ASM_SLIDES_2x2 := $(addsuffix '-2x2.pdf', $(ASM_BASES))
586C_SLIDES :=$(addsuffix '.pdf', $(C_BASES))
587C_SLIDES_2x2 := $(addsuffix '-2x2.pdf', $(C_BASES))
588C_EXAMPLES := $(addsuffix '/examples/', $(C_DIRS))
589
590
591ASM_DOCS = $(ASM_SLIDES) $(ASM_SLIDES_2x2) $(C_SLIDES) $(C_SLIDES_2x2)\
592 $(ASM_EXERCISES) $(C_EXERCISES)
593
594EXAMPLES = $(ASM_EXAMPLES) $(C_EXAMPLES)
595
596
597# Should be used only to initialize the directory structure if the repository is empty
598init_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
607copy_slides:
608 for file in $(ASM_DOCS); do\
609 echo cp $$file $(DESTINATION)/$$file;\
610 cp $$file $(DESTINATION)/$$file;\
611 done
612
613copy_examples:
614 for directory in $(EXAMPLES); do\
615 echo cp -r $$directory $(DESTINATION)/$$directory;\
616 cp -r $$directory $(DESTINATION)/$$directory;\
617 done
618
619copy_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
626SOLUTION_ASM1=asm-1-bases/exercises/exercises-bases.sol.pdf
627copy_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
634SOLUTION_ASM2=asm-2-architecture/exercises/exercises-architecture.sol.pdf
635copy_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
642SOLUTION_ASM3=asm-3-memory/exercises/exercises-memory.sol.pdf
643copy_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
650SOLUTION_ASM4=asm-4-codification/exercises/exercises-codification.sol.pdf
651copy_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
659SOLUTION_ASM5=asm-5-programming/exercises/exercise1/ asm-5-programming/exercises/exercise2/
660copy_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
667SOLUTION_ASM6=asm-6-bits-branching/exercises/logarithm/
668copy_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
676SOLUTION_ASM7=asm-7-procedures/exercises/exercise-procedures/
677copy_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
685SOLUTION_ASM8=asm-8-strings/exercises/exercise-strings/
686copy_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