| # $FreeBSD: releng/11.1/usr.bin/sort/Makefile 275042 2014-11-25 14:29:10Z bapt $ |
| |
| #.include <src.opts.mk> |
| |
| PROG= sort |
| |
| SRCS= bwstring.c coll.c file.c mem.c radixsort.c sort.c vsort.c |
| |
| MAN_SUB = |
| |
| ifdef MK_SORT_THREADS |
| CFLAGS += -D SORT_THREADS=1 |
| LIBS += -l pthread |
| MAN_SUB += -e "s/^%%THREADS%%//" |
| else |
| MAN_SUB += -e "s/^%%THREADS%%.*//" |
| endif |
| |
| CFLAGS+= -DWITHOUT_NLS |
| MAN_SUB += -e "s/^%%NLS%%.*//" |
| |
| #.include <bsd.prog.mk> |
| |
| CC := gcc |
| CFLAGS += -D "__FBSDID(S)=" |
| CFLAGS += -Wall -Os --std gnu99 |
| |
| CFLAGS += -D HAVE_OPENSSL=1 |
| CFLAGS += -D HAVE_MERGESORT=1 |
| LIBS += -l crypto |
| |
| SED ?= sed |
| |
| SRCS += merge.c |
| CFLAGS += --include merge.h |
| |
| OBJECTS = $(addsuffix .o,$(basename $(SRCS))) |
| |
| MANPAGE = sort.1 |
| |
| default: $(PROG) $(MANPAGE) |
| |
| $(PROG): $(OBJECTS) |
| $(CC) $(LDFLAGS) $^ -o $@ $(LIBS) |
| |
| sort.1: sort.1.in |
| $(SED) -E ${MAN_SUB} $< > $@ |
| |
| clean: |
| rm -f sort.1 $(OBJECTS) $(PROG) |