CC = @CC@
CFLAGS = -Wall @CFLAGS@ @DEFS@
CPPFLAGS = @CPPFLAGS@ @DEFS@
LDFLAGS = @LDFLAGS@ @LIBS@
INSTALL = @INSTALL@
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@

prefix = @prefix@
mandir = @mandir@
sysconfdir = @sysconfdir@
datadir = @datadir@
exec_prefix = @exec_prefix@
bindir = @bindir@

BINS = osslsigncode

all: $(BINS)
osslsigncode: osslsigncode.$(OBJEXT) @LIBOBJS@
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o osslsigncode$(EXEEXT) $(filter %.$(OBJEXT), $^)

osslsigncode.$(OBJEXT): osslsigncode.c compat.h win32.h config.h

.PHONY: clean distclean install
clean:
	rm -f *.$(OBJEXT) *.o $(BINS) *~
distclean: clean
	rm -f Makefile config.h config.status config.log

install: all
	-$(INSTALL) -d $(bindir)
	$(INSTALL) -m 755 osslsigncode$(EXEEXT) $(bindir)/osslsigncode$(EXEEXT)
