diff --git a/.gitignore b/.gitignore index e10a104..b80ba84 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -doc/Informe.pdf +Informe.pdf doc/*.aux doc/*.log doc/*.synctex.gz +doc/*.toc *.o sort diff --git a/Makefile b/Makefile index e075fa0..9715102 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,27 @@ CC=gcc CFLAGS=-Wall -Werror CPPFLAGS+=-Isrc/include #LDFLAGS=-lm -ODIR=obj SRC=src/sort.c OBJ=$(SRC:.c=.o) +all: sort informe + sort: $(OBJ) $(CC) -o $@ $^ $(LDFLAGS) -clean: - rm -f src/*.o sort +informe: +# if pdflatex is installed create the informe +ifneq (, $(shell which pdflatex)) + make -C doc + mv doc/Informe.pdf Informe.pdf +endif -.PHONY: sort clean +clean: cleansort cleaninforme + +cleansort: + rm -f src/*.o sort Informe.pdf + +cleaninforme: + make -C doc clean + +.PHONY: all sort informe clean cleansort cleaninforme diff --git a/doc/Informe.tex b/doc/Informe.tex index e69de29..6521b74 100644 --- a/doc/Informe.tex +++ b/doc/Informe.tex @@ -0,0 +1,74 @@ +\title{Tarea 1: Ordenamiento} +\author{} +\date{\today} + +\documentclass[12pt]{article} + +\usepackage[utf8]{inputenc} %\ This allows spanish tildes +\usepackage[spanish]{babel} +\usepackage{array} +\usepackage{adjustbox} +\usepackage{titling} +\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm,a4paper]{geometry} +\usepackage{amsmath} + +\pretitle{% + \begin{center} + \LARGE + \includegraphics[width=4cm]{ubblogo.png}\\[\bigskipamount] + \Large + \textbf{Análisis y Diseño de Algoritmos}\\[\smallskipamount] + } + +\posttitle{\end{center}} + +\begin{document} +\clearpage\maketitle +\thispagestyle{empty} + +\begin{flushright} +\textbf{Integrantes:}\\ +Christopher Cromer\\ +Rodolfo Cuevas +\end{flushright} + +\begin{flushright} +\textbf{Profesor:}\\ +Pedro Rodríguez +\end{flushright} + +\begin{flushright} +\textbf{Ayudantes:}\\ +Carlos Faúndez\\ +Xavier Canales +\end{flushright} + +\newpage + +\clearpage +\thispagestyle{empty} +\tableofcontents + +\newpage +\pagenumbering{arabic} + +\section{Psuedo código} + +\subsection{Merge Sort} + +\subsection{Quick Sort} + +\subsection{Bubble Sort} + +\subsection{Bitonic Sort} + +\subsection{Ordenamiento por conteo} + +\subsection{Ordenamiento por selección} + +\section{Análisis temporal} + +\section{Conclusiones} + +\end{document} + diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..788bb80 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,9 @@ +informe: + # we do this twice to make sure the toc is updated + pdflatex -synctex=1 -interaction=nonstopmode "Informe.tex" + pdflatex -synctex=1 -interaction=nonstopmode "Informe.tex" + +clean: + rm -f *.log *.toc *.gz *.aux Informe.pdf + +.PHONY: informe clean diff --git a/doc/ubblogo.png b/doc/ubblogo.png new file mode 100644 index 0000000..76f7dcc Binary files /dev/null and b/doc/ubblogo.png differ