diff options
author | yzrh <yzrh@noema.org> | 2020-12-31 18:43:29 +0000 |
---|---|---|
committer | yzrh <yzrh@noema.org> | 2020-12-31 18:45:02 +0000 |
commit | 3bd7ea7520e13f5fabcfadb1a7630398bc1dca6d (patch) | |
tree | 1f8336f75ee871574e37abbe49ddbaafcf7e88fc /src/Makefile | |
parent | 1f62c53da6edc5a82a1e0eceb401b2274cd4a0d1 (diff) | |
download | melon-3bd7ea7520e13f5fabcfadb1a7630398bc1dca6d.tar.gz melon-3bd7ea7520e13f5fabcfadb1a7630398bc1dca6d.tar.zst |
Improve portability.
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile index eb62818..f8c1e34 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,16 +4,25 @@ # SPDX-License-Identifier: Apache-2.0 # -src != ls *.c +src = melon.c iconv.c zlib.c \ + cnki_caj.c cnki_hn.c cnki_kdh.c cnki_outline_tree.c \ + cnki_pdf.c cnki_xml.c cnki_zlib.c cnki.c \ + pdf_cnki.c pdf_get.c pdf_parser.c pdf_writer.c pdf.c +inc = extern.h version.h iconv.h zlib.h \ + cnki.h pdf_cnki.h pdf.h + obj = ${src:.c=.o} PREFIX = /usr/local CFLAGS = -O3 -march=native -pipe -flto=thin -Wall -LDFLAGS = -Wl,-O3 -lcrypto -lz -Wl,--as-needed +LDFLAGS = -Wl,-O3 -lcrypto -liconv -lz -Wl,--as-needed + +CFLAGS += -I/usr/local/include +LDFLAGS += -L/usr/local/lib -all: ${obj} - ${CC} ${LDFLAGS} -o melon $> +all: ${obj} ${inc} + ${CC} ${LDFLAGS} -o melon ${obj} clean: rm -f melon ${obj} |