libfuncs is collection of code (list, queue, circular buffer, io, logging, etc.). https://georgi.unixsol.org/programs/libfuncs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 712B

12345678910111213141516171819202122232425262728293031323334
  1. CC = cc
  2. LINK = ld -o
  3. CROSS := $(TARGET)
  4. MKDEP = $(CROSS)$(CC) -M -o $*.d $<
  5. LIBRARY_LINK_OPTS = -L. -r
  6. CFLAGS = -O2 -ggdb -std=c99 -D_GNU_SOURCE
  7. CFLAGS += -Wall -Wextra -Wshadow -Wformat-security -Wstrict-prototypes
  8. RM = /bin/rm -f
  9. Q=@
  10. OBJS = queue.o list.o cbuf.o io.o log.o http_response.o asyncdns.o \
  11. server.o misc.o
  12. PROG = libfuncs.a
  13. all: $(PROG)
  14. $(PROG): $(OBJS)
  15. $(Q)echo " LINK $(PROG)"
  16. $(Q)$(CROSS)$(LINK) $@ $(LIBRARY_LINK_OPTS) $(OBJS)
  17. %.o: %.c libfuncs.h
  18. @$(MKDEP)
  19. $(Q)echo " CC libfuncs $<"
  20. $(Q)$(CROSS)$(CC) $(CFLAGS) -c $<
  21. -include $(OBJS:.o=.d)
  22. clean:
  23. $(Q)echo " RM $(PROG) $(OBJS:.o=.o) $(OBJS:.o=.d)"
  24. $(Q)$(RM) $(PROG) $(OBJS:.o=.o) $(OBJS:.o=.d) *~
  25. distclean: clean