This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir emerald | |
cd emerald | |
wget -qO- http://www.uio.no/studier/emner/matnat/ifi/INF5510/v11/undervisningsmateriale/kompilator/emerald-0.99-linux.tar.gz | tar -zxv | |
cd .. | |
echo "#Emerald" >> ~/.bashrc | |
echo "export EMERALDROOT='$PWD/emerald'" >> ~/.bashrc | |
echo "export PATH=\$PATH:\$EMERALDROOT/bin" >> ~/.bashrc | |
echo "set EMERALDARCH='i686mt'" >> ~/.bashrc | |
echo "emx -U -R" >> ~/.bashrc | |
echo "emx -U -Rhostname:port program" >> ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC = gcc | |
CFLAGS = -g -Wall -Wextra | |
OBJECTS = #insert objects here example: cool.o | |
PHONY: clean all | |
all: main | |
%.o: %.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# valgrind check for leaks and other errors | |
$ valgrind --leak-check=full ./program arg1 arg2 | |
# gdb debugger for segmentation fault etc... | |
$ gbd -ex=r --args ./program arg1 arg2 | |
# kcachegrind visual profiling | |
$ valgrind --tool=callgrind ./program | |
$ kcachegrind & |