diff --git a/Task_3/Task_3.1/Makefile b/Task_3/Task_3.1/Makefile new file mode 100644 index 0000000..ef892f9 --- /dev/null +++ b/Task_3/Task_3.1/Makefile @@ -0,0 +1,35 @@ +# Syntax +# : +# +# ... + +# variables +CXX = g++ +CXXFLAGS = -Wall -std=c++11 + +# standard rule +all: main + +# creating main from main.o and hello_world.a +# $@ = target +# $^ = dependencies +main: main.o hello_world.a + $(CXX) $(CXXFLAGS) -o $@ $^ + +# creating archive out of object +# % = filename without ending +# $@ = target +# $^ = dependencies +%.a: %.o + ar rcs $@ $^ + +# creating object out of cpp +# % = filename without ending +# $@ = target +# $^ = dependencies +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c -o $@ $^ + +# remove all objects and archives +clean: + rm -f *.o *.a main \ No newline at end of file diff --git a/Task_3/Task_3.1/hello_world.cpp b/Task_3/Task_3.1/hello_world.cpp new file mode 100644 index 0000000..df27813 --- /dev/null +++ b/Task_3/Task_3.1/hello_world.cpp @@ -0,0 +1,9 @@ +#include +#include "hello_world.h" + +void hello() { + std::cout << "Hello World" << std::endl; +} + +// g++ -c hello_world.cpp -o hello_world.o +// ar rcs hello_world.a hello_world.o \ No newline at end of file diff --git a/Task_3/Task_3.1/hello_world.h b/Task_3/Task_3.1/hello_world.h new file mode 100644 index 0000000..88cf2ba --- /dev/null +++ b/Task_3/Task_3.1/hello_world.h @@ -0,0 +1,6 @@ +#ifndef HELLO_WORLD_H +#define HELLO_WORLD_H + +void hello(); // Deklaration der Funktion + +#endif \ No newline at end of file diff --git a/Task_3/Task_3.1/main.cpp b/Task_3/Task_3.1/main.cpp new file mode 100644 index 0000000..32a76c1 --- /dev/null +++ b/Task_3/Task_3.1/main.cpp @@ -0,0 +1,7 @@ +#include +#include "hello_world.h" + +int main(){ + hello(); + return 0; +} diff --git a/Task_3/Task_3.2/Makefile b/Task_3/Task_3.2/Makefile new file mode 100644 index 0000000..052a336 --- /dev/null +++ b/Task_3/Task_3.2/Makefile @@ -0,0 +1,27 @@ +# Syntax +# : +# +# ... + +# variables +LATEX = pdflatex +BIB = bibtex + +all: linux-24.pdf + +# creating a pdf outof tex and bib file +# % = filename without ending +# $* = filename corresponding to % +%.pdf: %.tex %.bib + $(LATEX) $* + $(BIB) $* + $(LATEX) $* + + # Überprüfe auf "undefined references" im Log-File + @if grep -q "undefined references" $*.log; then \ + $(LATEX) $*; \ + fi + +# remove all created files +clean: + rm -f *.pdf *.aux *.log *.bbl *.blg \ No newline at end of file diff --git a/Task_3/Task_3.2/linux-24.bib b/Task_3/Task_3.2/linux-24.bib new file mode 100644 index 0000000..4d85080 --- /dev/null +++ b/Task_3/Task_3.2/linux-24.bib @@ -0,0 +1,16 @@ +@article{SchifferF16, + author = {Stefan Schiffer and + Alexander Ferrein}, + title = {Decision-Theoretic Planning with Fuzzy Notions in {GOLOG}}, + journal = {International Journal of Uncertainty, Fuzziness and Knowledge-Based + Systems}, + volume = {24}, + number = {Supplement-2}, + pages = {123--144}, + year = {2016}, + url = {https://doi.org/10.1142/S0218488516400134}, + doi = {10.1142/S0218488516400134}, + timestamp = {Mon, 15 Jan 2018 16:48:09 +0100}, + biburl = {https://dblp.org/rec/bib/journals/ijufks/0002F16}, + bibsource = {dblp computer science bibliography, https://dblp.org} +} \ No newline at end of file diff --git a/Task_3/Task_3.2/linux-24.tex b/Task_3/Task_3.2/linux-24.tex new file mode 100644 index 0000000..a2800ea --- /dev/null +++ b/Task_3/Task_3.2/linux-24.tex @@ -0,0 +1,8 @@ +\documentclass{article} + +\begin{document} +The course Linux-24 is awesome~\cite{SchifferF16}! + +\bibliographystyle{alpha} +\bibliography{linux-24.bib} +\end{document} \ No newline at end of file