the_silver_searcher/Makefile.w32
K.Takata a2e543d85f use $(CC) instead of gcc
MinGW has various gcc aliases:
mingw32-gcc, i686-pc-mingw32-gcc, i686-w64-mingw32-gcc,
x86_64-w64-mingw32-gcc, etc.
This change enables to use them.
2014-05-22 20:16:56 +09:00

31 lines
544 B
Text

VERSION=$(shell grep -Po "(?<=\[)([0-9.]+.[0-9]+.[0-9]+)(?=\])" configure.ac)
CC=gcc
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
OBJS = $(subst .c,.o,$(SRCS))
CFLAGS = -O2 -Isrc/win32 -DPACKAGE_VERSION=\"$(VERSION)\"
LIBS = -lz -lpthread -lpcre -llzma -lshlwapi
TARGET = ag.exe
all : $(TARGET)
$(TARGET) : $(OBJS)
$(CC) -o $@ $(OBJS) $(LIBS)
.c.o :
$(CC) -c $(CFLAGS) -Isrc $< -o $@
clean :
rm -f src/*.o $(TARGET)