Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 48 lines (35 sloc) 1.075 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
CC=clang
FLAGS=-Wall -Wextra -Wmost -Weverything -Wno-switch-enum

all: hellocharm ddr rl

charm.o: charm.c charm.h
$(CC) -c charm.c charm.h

hellocharm: hellocharm.c charm.c charm.h
$(CC) $(FLAGS) -o hellocharm hellocharm.c charm.c

ddr: ddr.c charm.c charm.h
$(CC) $(FLAGS) -o ddr ddr.c charm.c -lgc

rl: rl.c charm.c charm.h
$(CC) $(FLAGS) -o rl rl.c charm.c -lgc

install: charm.c charm.h
cp charm.h /usr/include
sed s/'#include "charm.h"'/'#include <charm.h>'/ charm.c > /usr/include/charm.c

uninstall:
-rm /usr/include/charm.c
-rm /usr/include/charm.h

splint:
find . -type f -name '*.c' -exec splint {} \;
find . -type f -name '*.h' -exec splint {} \;

vera++:
find . -type f -name '*.cpp' -exec vera++ -s {} \;
find . -type f -name '*.c' -exec vera++ -s {} \;
find . -type f -name '*.h' -exec vera++ -s {} \;

lint: splint vera++

valgrind: $(BIN)
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --track-fds=yes --dsymutil=yes echo q | ./hellocharm

churn:
bundle exec churn

clean:
-rm *.exe
-rm *.o
-rm rl
-rm ddr
-rm hellocharm
Something went wrong with that request. Please try again.