~ecs/ini

ref: 4f8a0c241d9b7084463cc95ed2888ac36e1310ec ini/Makefile -rw-r--r-- 690 bytes
4f8a0c24 — Eyal Sawady ini.1: better AUTHORS section 10 months ago
                                                                                
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
CC ?= gcc
CFLAGS ?= -static -Wall -Wextra -pedantic -O2 -ansi -Werror -pedantic-errors \
         -Wno-unused-command-line-argument -Wno-reserved-id-macro -Wno-cast-qual
PREFIX ?= /usr/local

# inih requires -Wno-reserved-id-macro and -Wno-cast-qual under clang with
# -Werror -Weverything, and musl-clang under Arch Linux requires
# -Wno-unused-command-line-argument

all: ini doc
	rm -f ini.o

install: ini ini.1
	cp ini $(PREFIX)/bin/ini
	cp ini.1 $(PREFIX)/share/man/man1/ini.1

ini: inih-target frontend.c
	$(CC) $(CFLAGS) frontend.c ini.o -o ini

inih-target: inih/ini.c
	$(CC) -Iinih $(CFLAGS) -c inih/ini.c -o ini.o

doc: ini.1.scd
	scdoc <ini.1.scd >ini.1

clean:
	rm -f ini.o ini