Makefile 479 B

123456789101112131415161718192021222324252627
  1. # Makefile - (C) Chris Dorman, 2013 <cddo@riseup.net>
  2. PREFIX = /usr/local
  3. CC = gcc
  4. CFLAGS = -O2 -Wall -Wextra
  5. LDFLAGS =
  6. BIN = chttpd
  7. CONFIGFILE = inc/chttpd.conf
  8. OBJECTS = src/chttpd.o src/functions.o src/cgi.o src/check.o src/log.o
  9. all: main
  10. fresh: clean all
  11. main: $(OBJECTS)
  12. $(CC) $(OBJECTS) -o $(BIN) $(LDFLAGS) $(CFLAGS)
  13. clean:
  14. rm -f $(OBJECTS) $(BIN)
  15. install:
  16. cp $(BIN) $(PREFIX)/bin/$(BIN)
  17. cp $(CONFIGFILE) /etc/chttpd.conf
  18. cp inc/$(BIN) /etc/init.d/$(BIN)