summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2019-12-29 20:40:54 -0700
committerAaron Ball <nullspoon@oper.io>2019-12-29 20:40:54 -0700
commit4435ffc2d9c45f1b792b0eadd6e7d3a7fff8406e (patch)
tree3ba32bcfeb8ab1131647f8a72e002d72771cefae
parent303564d281e2bb476a5813eca4fc478874013c7c (diff)
downloadterminus-4435ffc2d9c45f1b792b0eadd6e7d3a7fff8406e.tar.gz
terminus-4435ffc2d9c45f1b792b0eadd6e7d3a7fff8406e.tar.xz
Update Makefile with ccopts and fix debug
CCOPTS now turn on all warnings, optimize, and set standard to gnu99.
-rw-r--r--Makefile5
-rw-r--r--src/main.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 21c830f..bb9410e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,8 @@
out = terminus
+CCOPTS = --std=gnu99 -Wall -O2
all:
- cc src/main.c -o $(out)
+ cc $(DBG) $(CCOPTS) src/main.c -o $(out)
debug:
- make all dbg="-g"
+ make all DBG="-g"
diff --git a/src/main.c b/src/main.c
index 4201592..409e146 100644
--- a/src/main.c
+++ b/src/main.c
@@ -72,7 +72,7 @@ int write_lastlogin(char* path) {
if(f == NULL) { return 1; }
// Write the current time
- fprintf(f, "%d", time(NULL));
+ fprintf(f, "%d", (int) time(NULL));
fclose(f);
return 0;

Generated by cgit