forked from ggreer/the_silver_searcher
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.w32
35 lines (28 loc) · 668 Bytes
/
Makefile.w32
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
28
29
30
31
32
33
34
35
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)