# Example of a typical Makefile template for autosetup

# Tools. CC is standard. The rest are via cc-check-tools
CC = @CC@
RANLIB = @RANLIB@
AR = @AR@
STRIP = @STRIP@

# FLAGS/LIBS
CFLAGS += @CFLAGS@
LDFLAGS += @LDFLAGS@
LDLIBS += @LIBS@
#LDLIBS += -lsqlite3 -lz

# Install destination
prefix = @prefix@
exec_prefix = @exec_prefix@
DESTDIR = $(prefix)

#SRC.DIR := @top_srcdir@/src
SRC.DIR := src
#OBJ.DIR := @top_srcdir@/obj
OBJ.DIR := obj

# Project-specific CFLAGS
TOP_INCDIR = @top_srcdir@/include
#CPPFLAGS += -D_GNU_SOURCE -Wall -Werror -I. -I$(TOP_INCDIR)
CPPFLAGS += -I. -I$(TOP_INCDIR) -I$(HOME)/include
#ifeq (gcc,@CC@)

ifeq (,$(filter tcc,$(CC)))
  CPPFLAGS += -Wall -Werror -pedantic -fno-strict-aliasing
  ifeq (1,@HAVE_C99_INT@)
    CPPFLAGS += -std=c99
  else
    CPPFLAGS += -std=c89
  #  ifeq (1,@HAVE_LONG_LONG@)
     # Avoid a -Werror/-Wall/-pedantic failure in sqlite3.h:
      CPPFLAGS += -Wno-long-long
  #  endif
  endif
endif
# /tcc

# VPATH support for out-of-tree build
ifneq (@srcdir@,.)
CPPFLAGS += -I@srcdir@
VPATH = @srcdir@
endif

CLEAN_FILES += *.o lib*.a *.so

BUILD_QUIETLY ?= @BUILD_QUIETLY@
