diff options
author | B. Watson <urchlay@slackware.uk> | 2024-01-04 16:28:29 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-01-04 16:28:29 -0500 |
commit | 1982b8ef05ecf839a82792866c21219feb8fa7cc (patch) | |
tree | 3d5ab72cd16d391a9798f4ef8cde3e548c55293d | |
parent | aafee279877e0e9762f2852a3b2bbaeb2e4661fa (diff) | |
download | hcalc-1982b8ef05ecf839a82792866c21219feb8fa7cc.tar.gz |
Compile as c99, link math lib, preparing for FP exceptions.
-rw-r--r-- | Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,8 +1,9 @@ # Makefile for hcalc. Requires GNU make. -# Users and packagers, feel free to override these: +# Users and packagers, feel free to override these. +# Do not override CFLAGS! Use COPT instead. CC = gcc -CFLAGS = -Wall -g +COPT = LIBS = DESTDIR = PREFIX = /usr @@ -33,6 +34,11 @@ GZIP = gzip # - realclean is a maintainer-only target, deletes generated files that are # in git. +# -D_POSIX_C_SOURCE needed for fileno(), when using -std=c99 +#CFLAGS = -Wall -g -std=c99 -D_POSIX_C_SOURCE $(COPT) +# -std=gnu99 works on gcc and clang. +CFLAGS = -Wall -g -std=gnu99 $(COPT) + PROJ = hcalc VERSION = 1.2u1 MANPAGE = $(PROJ).1 @@ -71,7 +77,7 @@ version.h: VERSION echo '#define VERSION "$(VERSION)"' > version.h $(PROJ): $(OBJS) - $(CC) -o $@ $^ $(LDFLAGS) -lXpm -lX11 $(LIBS) + $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lXpm -lX11 -lm $(MANPAGE): $(PROJ).rst version.rst rst2man $(PROJ).rst > $(MANPAGE) |