diff options
author | Aaron Ball <nullspoon@iohq.net> | 2015-02-16 18:40:18 -0700 |
---|---|---|
committer | Aaron Ball <nullspoon@iohq.net> | 2015-02-16 18:42:46 -0700 |
commit | 44d8d50ddf14a6741328a7651e0a5deafc0fa17d (patch) | |
tree | 1d8bed91213d41cc123484fdbdf7be91c3211b97 | |
parent | 2af81be4177c32137b8b2672bf4973f9b8e80f6f (diff) | |
download | noteless-44d8d50ddf14a6741328a7651e0a5deafc0fa17d.tar.gz noteless-44d8d50ddf14a6741328a7651e0a5deafc0fa17d.tar.xz |
Rewrite of Makefile
Add warnings, c standard variable (set to 99), and updated library source
paths. Also made compiler a variable for later autodetection.
-rw-r--r-- | Makefile | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -1,18 +1,19 @@ out = noteless -libs = src/lib/ obj = obj/ - +std = c99 +warnings = -Wall -Wpedantic +cc = cc all: if [[ ! -d obj ]]; then mkdir obj; fi - g++ $(debug) -c $(libs)path.c -o $(obj)path.o - g++ $(debug) -c $(libs)config.c -o $(obj)config.o - g++ $(debug) -c $(libs)note.c -o $(obj)note.o - g++ $(debug) -c $(libs)note_list.c -o $(obj)note_list.o - g++ $(debug) src/main.c $(obj)*.o -o $(out) + $(cc) $(dbg) $(warnings) -std=$(std) -c src/path.c -o $(obj)path.o + $(cc) $(dbg) $(warnings) -std=$(std) -c src/config.c -o $(obj)config.o + $(cc) $(dbg) $(warnings) -std=$(std) -c src/note.c -o $(obj)note.o + $(cc) $(dbg) $(warnings) -std=$(std) -c src/note_list.c -o $(obj)note_list.o + $(cc) $(dbg) $(warnings) -std=$(std) src/main.c $(obj)*.o -o $(out) debug: - make all debug="-g" + make all dbg="-g" clean: rm -rvf $(obj)*.o |