encode_uint32 second parameter should be uint32_t, not unsigned long
[git-daemon2.git] / Makefile
blobc92ee9e058000e38a4c3f01ba55fd09eeaf6ee2c
2 # Define NO_SRP if you don't want SRP support.
4 # Define NO_IPV6 if you don't want IPv6 support.
6 # Define NO_SO_PEERCRED if your OS does not support SO_PEERCRED
8 # Define SERVER_ONLY to only build the server.
11 ifdef SERVER_ONLY
12 all: git-daemon2 gits-get-key-id gits-generate-hostkey
13 else
14 all: git-daemon2 git-remote-gits gits-get-key-id gits-generate-srp-verifier gits-generate-hostkey gits-generate-keypair
15 endif
17 CFLAGS=-Wall -Werror -g
18 LDFLAGS=-rdynamic
20 SERVERFILES = server/main.o server/os_exception.o server/user.o server/cbuffer.o server/mainloop.o common/user.o common/cbuffer.o server/listensock.o server/srp-udb.o server/log.o server/certificate.o server/signals.o server/pkt-decoder.o server/userchange.o common/misc.o server/unix.o server/ssh-keypair.o
22 ifndef NO_SRP
23 SERVERFILES += server/srp-udb.o
24 else
25 CFLAGS += -DDISABLE_SRP
26 endif
28 ifndef NO_SO_PEERCRED
29 CFLAGS += -DUSE_SO_PEERCRED=1
30 endif
32 ifdef NO_IPV6
33 CFLAGS += -DNO_IPV6=1
34 SERVERFILES += server/inet-basic.o
35 else
36 SERVERFILES += server/inet-advanced.o
37 endif
39 CLIENT_SSH_COMPLEX = client/ssh.o client/ssh_localkey.o client/pem.o client/base64.o client/home.o client/pem_decrypt.o client/srp_askpass.o client/prompt.o common/user.o common/cbuffer.o common/misc.o
41 git-daemon2: $(SERVERFILES)
42 g++ $(LDFLAGS) -o $@ $^ -lgnutls
44 git-remote-gits: client/main.o client/compat.o client/keypairs.o client/hostkey.o client/certificate.o client/connect.o $(CLIENT_SSH_COMPLEX)
45 gcc $(LDFLAGS) -o $@ $^ -lgnutls
47 gits-get-key-id: getkeyid.o client/certificate.o client/compat.o $(CLIENT_SSH_COMPLEX)
48 gcc $(LDFLAGS) -o $@ $^ -lgnutls
50 gits-generate-srp-verifier: gensrpverifier.o client/prompt.o client/compat.o client/home.o
51 gcc $(LDFLAGS) -o $@ $^ -lgnutls
53 gits-generate-hostkey: genhostkey.o client/home.o common/mkcert.o common/cbuffer.o client/compat.o client/prompt.o
54 gcc $(LDFLAGS) -o $@ $^ -lgnutls
56 gits-generate-keypair: genkeypair.o client/home.o common/mkcert.o common/cbuffer.o client/compat.o client/prompt.o
57 gcc $(LDFLAGS) -o $@ $^ -lgnutls
59 %.o: %.cpp
60 g++ $(CFLAGS) -c -o $@ $< -Icommon -Iserver
62 %.o: %.c
63 gcc $(CFLAGS) -c -o $@ $< -Iclient -Icommon -DUSE_UNIX_SCATTER_GATHER_IO -DUSE_TRAP_PAGING -DBUILD_SELFSTANDING
65 clean:
66 rm -f client/*.o common/*.o server/*.o *.o git-daemon2 git-remote-gits gits-generate-hostkey gits-generate-keypair gits-generate-srp-verifier gits-get-key-id gits-hostkey