the_silver_searcher/Makefile.w32
Sebastian Godelet 120b63064c Makefile.w32: Remove Perl-regex grep dependency
msys grep does not support the -Po option, so use sed instead
README.md: better describe that building requires an msys/MinGW
environment
2016-02-17 10:43:35 +08:00

35 lines
668 B
Text

SED=sed
VERSION:=$(shell "$(SED)" -n "s/[^[]*\[\([0-9]\+\.[0-9]\+\.[0-9]\+\)\],/\1/p" configure.ac)
CC=gcc
RM=/bin/rm
SRCS = \
src/decompress.c \
src/ignore.c \
src/lang.c \
src/log.c \
src/main.c \
src/options.c \
src/print.c \
src/scandir.c \
src/search.c \
src/util.c \
src/print_w32.c
OBJS = $(subst .c,.o,$(SRCS))
CFLAGS = -O2 -Isrc/win32 -DPACKAGE_VERSION=\"$(VERSION)\"
LIBS = -lz -lpthread -lpcre -llzma -lshlwapi
TARGET = ag.exe
all : $(TARGET)
# depend on configure.ac to account for version changes
$(TARGET) : $(OBJS) configure.ac
$(CC) -o $@ $(OBJS) $(LIBS)
.c.o :
$(CC) -c $(CFLAGS) -Isrc $< -o $@
clean :
$(RM) -f src/*.o $(TARGET)