# -*- makefile -*- 
#
# builds a C library, installs a single public include file
#
# Required macros:
#  TARGET = libraryname  (no leading lib or trailing .so or whatever)
# VERSION = version number major.minor
#   API_0 = public include file
# HEADERS = private include files
# SOURCES = list of C source files in this library
#  CFLAGS = extra compiler flags
#  EXTRAS = other files that make distclean should not nuke

!include $(CONFIG)\make\initial
TCL_INC=-I$(TCL_PREFIX)\include
!include $(CONFIG)\make\lib

install-includes: $(INCLUDE_DIR) $(INCLUDE_DIR)\$(API_0)

$(INCLUDE_DIR)\$(API_0): $(source)\$(API_0)
	$(CP) $(source)\$(API_0) $(INCLUDE_DIR)
	$(TOUCH) $@

uninstall-includes:
	-$(RM) $(INCLUDE_DIR)\$(API_0)

$(source)\cntrs.c: $(source)\$(API_0)
	$(TCLSH) $(CSLU_BIN_DIR)\parse $(source)\$(API_0)

!include $(CONFIG)\make\final
