make: simplify makefile, advertise clang

Wed, 09 Oct 2019 16:52:41 +0200

author
David Demelier <markand@malikania.fr>
date
Wed, 09 Oct 2019 16:52:41 +0200
changeset 13
62ac42bd4851
parent 12
6621c6f2b7e2
child 14
df8639b5b248

make: simplify makefile, advertise clang

Makefile file | annotate | diff | comparison | revisions
--- a/Makefile	Fri Sep 20 13:30:41 2019 +0200
+++ b/Makefile	Wed Oct 09 16:52:41 2019 +0200
@@ -16,8 +16,10 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #
 
-CFLAGS=         -Wall -Wextra -pedantic -std=c99 ${EXTRA_CFLAGS}
-CPPFLAGS=       -DNDEBUG -D_XOPEN_SOURCE=700
+.POSIX:
+
+CC=             clang
+CFLAGS=         -Wall -Wextra -pedantic -std=c11 -DNDEBUG -D_XOPEN_SOURCE=700 ${EXTRA_CFLAGS}
 LDFLAGS=        ${EXTRA_LDFLAGS}
 LDLIBS=         ${EXTRA_LDLIBS}
 
@@ -33,9 +35,6 @@
 
 all: ${PROG}
 
-.c.o:
-	${CC} ${CPPFLAGS} ${CFLAGS} -c -o $@ $<
-
 ${PROG}: ${OBJS}
 	${CC} -o ${PROG} ${OBJS} ${LDFLAGS} ${LDLIBS}
 

mercurial