0 SHELL = /bin/sh

1

2 PREFIX = /usr/local

3

4 CFLAGS = -ansi -std=c89 -pedantic -Wall -Wextra \

5 -O2 -D_POSIX_C_SOURCE=200809L

6 CC = cc

7 # Uncomment to build on Illumos

8 #CFLAGS = -ansi -std=c89 -pedantic -O2 -Wall -Wextra -lsocket -lsendfile

9 #CC = gcc

10

11 SRC = src/main.c src/parser.c src/server.c src/sandbox.c src/strlcpy.c \

12 -D_POSIX_C_SOURCE=200809L #-DNO_PROXY -DNO_SANDBOX

13

14 upload: src/*

15 ${CC} ${SRC} ${CFLAGS} -o $@

16

17 install:

18 cp upload ${PREFIX}/bin

19 chmod 755 ${PREFIX}/bin/upload

20

21 uninstall:

22 rm ${PREFIX}/bin/upload

23

24 clean:

25 rm -f upload

26