1 # A simple gmake Makefile, to be used on Linux and Darwin. It shouldn't
2 # be used elsewhere because it assumes that the target system doesn't
3 # support BSD extended file flags.
12 UNAME= $(shell uname -s)
14 SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \
15 globtree.c idcache.c keyword.c lex.rcs.c lister.c main.c misc.c mux.c \
16 pathcomp.c parse.c proto.c rcsfile.c rcsparse.c rsyncfile.c status.c \
17 stream.c threads.c token.c updater.c
20 WARNS= -Wall -W -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith \
21 -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow \
22 -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline \
23 -Wnested-externs -Wredundant-decls -Wno-format-y2k
25 CFLAGS+= -g -O -pipe -DNDEBUG -I$(PREFIX)/include
26 ifeq ($(UNAME), Linux)
27 CFLAGS+= -D_XOPEN_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
29 ifeq ($(UNAME), Darwin)
30 CFLAGS+= -DHAVE_FFLAGS
33 LDFLAGS= -L$(PREFIX)/lib -lcrypto -lz -lpthread
35 .PHONY: all clean install
40 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
51 rm -f csup $(OBJS) parse.c parse.h token.c csup.1.gz
54 $(CC) $(CFLAGS) -c -o $@ $<
62 install: csup csup.1.gz
63 install -s -o $(OWNER) -g $(GROUP) csup $(PREFIX)/bin
64 install -s -o $(OWNER) -g $(GROUP) csup.1.gz $(PREFIX)/share/man/man1