#
# TARGETs:
# - config: create required config files wrt. the current platform. It must be
# run once before one of the following targets can properly be made.
# - all: compile and link everything
# - clean: remove alle temporary files required for linking
# - clobber: clean + remove all config files which rarely change
# - install: install all the stuff below $(ROOT)/$(PREFIX)
#
# 'BT=' compiles 32bit, if ommitted it defaults to '64'
# ROOT defaults to an empty string
# PREFIX defaults to /usr
# avoid the chicken and egg problem
tgz:
$(ECHO) "$${TMPDIR:-/tmp}/k10sensor exists. Remove it first." ; false ; \
fi
@echo "\nSource archive ready: $${TMPDIR:-/tmp}/k10sensor.tar.gz\n"
@$(ECHO) "\n\
#include <pciaccess.h>\nint main(int argc, char **argv) {\n\
pci_system_init();\n}" >lpcitest.c
@$(ECHO) "Done."
@[ ! -x lpciTest ] && $(ECHO) "libpciaccess not found. LIBPCI_* variables in the generated config.mk need help!" || true
@# aquire all info so that we can write out in one row
#for Solaris 10, we need to know, where libpci is installed\n\
# write out the results \
C99MODE = %s(C99_ENABLE)\n\
DLPI_LIBS = $$DLPI_LIBS\n\
$$PCI_STUFF\n" \
'$$' \
>> $(MAKECONFIG) && \
$(ECHO) "$$DLPI_DEFS" >$@