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 701B

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