
CC = @CC@
CFLAGS = @CFLAGS@
CCDLFLAGS = @CCDLFLAGS@

LIBS = @LIBS@
LDFLAGS = @LDFLAGS@
LDDLFLAGS = @LDDLFLAGS@

EXE_EXT = @EXEEXT@
SHLIBEXT = .so

SPAMC_FILES = spamd/spamc.c

LIBSPAMC_FILES = spamd/libspamc.c spamd/utils.c

all: spamd/spamc$(EXE_EXT)
	true

libspamc: spamd/libspamc$(SHLIBEXT)
	true

spamd/spamc$(EXE_EXT): $(SPAMC_FILES) $(LIBSPAMC_FILES)
	$(CC) $(CFLAGS) $(SPAMC_FILES) $(LIBSPAMC_FILES) \
		-o $@ $(LDFLAGS) $(LIBS)

spamd/libspamc$(SHLIBEXT): $(LIBSPAMC_FILES)
	$(CC) $(CCDLFLAGS) $(LIBSPAMC_FILES) -o $@ $(LDDLFLAGS) $(LIBS)

