logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

main.mk (1004B)


  1. # SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
  2. #
  3. # SPDX-License-Identifier: GPL-3.0-or-later
  4. CC = tcc
  5. AR = tcc -ar
  6. # -DSIZEOF_UNSIGNED_LONG=4 forces use of simulated arithmetic
  7. # This is to avoid running configure test to determine sizeof(long long)
  8. CPPFLAGS = -DHAVE_FCNTL_H \
  9. -DHAVE_DIRENT_H \
  10. -DHAVE_GETCWD_H \
  11. -DHAVE_GETCWD \
  12. -DSIZEOF_UNSIGNED_LONG=4 \
  13. -DVERSION=\"1.12\" \
  14. -DPACKAGE=\"tar\"
  15. CFLAGS = -I . -I lib
  16. LDFLAGS = -L . -ltar -static
  17. .PHONY: all
  18. LIB_SRC = argmatch backupfile error fnmatch ftruncate getdate_stub getopt getopt1 getversion modechange msleep xgetcwd xmalloc xstrdup
  19. LIB_OBJ = $(addprefix lib/, $(addsuffix .o, $(LIB_SRC)))
  20. TAR_SRC = arith buffer compare create delete extract incremen list mangle misc names open3 rtapelib tar update
  21. TAR_OBJ = $(addprefix src/, $(addsuffix .o, $(TAR_SRC)))
  22. all: tar
  23. libtar.a: $(LIB_OBJ)
  24. $(AR) cr $@ $^
  25. tar: libtar.a $(TAR_OBJ)
  26. $(CC) $^ $(LDFLAGS) -o $@