include_rules

ifeq ($(TUP_SERVER),ldpreload)
CFLAGS += $(FPIC)

# __realpath_chk is defined with -Os but undefined without optimization.
CFLAGS += -Wno-redundant-decls
CFLAGS += -pthread

# Don't see _FILE_OFFSET_BITS since we're compiling both 32-bit and 64-bit
# modules.
CFLAGS += -U_FILE_OFFSET_BITS

srcs += *.c
srcs += ../tup/flock/fcntl.c
srcs += ../tup/ccache.c

ifeq ($(X86_ARCH_SIBLINGS),y)
  : foreach $(srcs) |> !cc |> %B.64.o
  CFLAGS += -m32
  : foreach $(srcs) |> !cc |> %B.32.o
else
  : foreach $(srcs) |> !cc |> %B.o
endif
endif
