Use standard heimdal function for finding interfaces - libreplace provides support...
[tprouty/samba.git] / source4 / heimdal_build / internal.mk
index 3578980102cca9aca2150a57523c7630a6111885..92bef089e417bb9e3387930a35d31151f9ff4fbe 100644 (file)
@@ -2,6 +2,23 @@ heimdalbuildsrcdir = $(heimdalsrcdir)/../heimdal_build
 
 HEIMDAL_VPATH = $(heimdalbuildsrcdir):$(heimdalsrcdir)/lib/asn1:$(heimdalsrcdir)/lib/krb5:$(heimdalsrcdir)/lib/gssapi:$(heimdalsrcdir)/lib/hdb:$(heimdalsrcdir)/lib/roken:$(heimdalsrcdir)/lib/des
 
+# Create a prototype header
+# Arguments: header file, arguments, c files, deps
+define heimdal_proto_header_template
+
+proto:: $(1)
+
+clean:: ;
+       rm -f $(1)
+
+$(4):: $(1)
+
+$(1): $(3) ;
+       @echo "Creating $$@"
+       @$$(PERL) $$(heimdalsrcdir)/cf/make-proto.pl $(2) $(1) $(3)
+
+endef
+
 #######################
 # Start SUBSYSTEM HEIMDAL_KDC
 [SUBSYSTEM::HEIMDAL_KDC]
@@ -27,6 +44,20 @@ HEIMDAL_KDC_OBJ_FILES = \
        $(heimdalsrcdir)/kdc/windc.o \
        $(heimdalsrcdir)/kdc/kx509.o
 
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/kdc/kdc-protos.h, \
+  -q -P comment -o, \
+  $(HEIMDAL_KDC_OBJ_FILES:.o=.c), \
+  $(HEIMDAL_KDC_OBJ_FILES) $(HEIMDAL_KDC_OBJ_FILES:.o=.d) \
+))
+
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/kdc/kdc-private.h, \
+  -q -P comment -p, \
+  $(HEIMDAL_KDC_OBJ_FILES:.o=.c), \
+  $(HEIMDAL_KDC_OBJ_FILES) $(HEIMDAL_KDC_OBJ_FILES:.o=.d) \
+))
+
 [SUBSYSTEM::HEIMDAL_NTLM]
 CFLAGS = -I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/ntlm
 PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN HEIMDAL_HCRYPTO HEIMDAL_KRB5
@@ -34,6 +65,13 @@ PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN HEIMDAL_HCRYPTO HEIMDAL_KRB5
 HEIMDAL_NTLM_OBJ_FILES = \
        $(heimdalsrcdir)/lib/ntlm/ntlm.o
 
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/lib/ntlm/heimntlm-protos.h, \
+  -q -P comment -o, \
+  $(HEIMDAL_NTLM_OBJ_FILES:.o=.c), \
+  $(HEIMDAL_NTLM_OBJ_FILES) $(HEIMDAL_NTLM_OBJ_FILES:.o=.d) \
+))
+
 [SUBSYSTEM::HEIMDAL_HDB_KEYS]
 CFLAGS = -I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/hdb
 PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN HEIMDAL_HCRYPTO HEIMDAL_KRB5 \
@@ -59,6 +97,20 @@ HEIMDAL_HDB_OBJ_FILES = \
        $(heimdalsrcdir)/lib/hdb/ndbm.o \
        $(heimdalsrcdir)/lib/hdb/hdb_err.o
 
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/lib/hdb/hdb-protos.h, \
+  -q -P comment -o, \
+  $(HEIMDAL_HDB_OBJ_FILES:.o=.c), \
+  $(HEIMDAL_HDB_OBJ_FILES) $(HEIMDAL_HDB_OBJ_FILES:.o=.d) \
+))
+
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/lib/hdb/hdb-private.h, \
+  -q -P comment -p, \
+  $(HEIMDAL_HDB_OBJ_FILES:.o=.c), \
+  $(HEIMDAL_HDB_OBJ_FILES) $(HEIMDAL_HDB_OBJ_FILES:.o=.d) \
+))
+
 #######################
 # Start SUBSYSTEM HEIMDAL_GSSAPI
 [SUBSYSTEM::HEIMDAL_GSSAPI]
@@ -75,6 +127,13 @@ HEIMDAL_GSSAPI_SPNEGO_OBJ_FILES = \
        $(heimdalsrcdir)/lib/gssapi/spnego/cred_stubs.o \
        $(heimdalsrcdir)/lib/gssapi/spnego/accept_sec_context.o \
 
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/lib/gssapi/spnego/spnego-private.h, \
+  -q -P comment -p, \
+  $(HEIMDAL_GSSAPI_SPNEGO_OBJ_FILES:.o=.c), \
+  $(HEIMDAL_GSSAPI_SPNEGO_OBJ_FILES) $(HEIMDAL_GSSAPI_SPNEGO_OBJ_FILES:.o=.d) \
+))
+
 HEIMDAL_GSSAPI_KRB5_OBJ_FILES = \
        $(heimdalsrcdir)/lib/gssapi/krb5/copy_ccache.o \
        $(heimdalsrcdir)/lib/gssapi/krb5/delete_sec_context.o \
@@ -122,6 +181,13 @@ HEIMDAL_GSSAPI_KRB5_OBJ_FILES = \
        $(heimdalsrcdir)/lib/gssapi/krb5/process_context_token.o \
        $(heimdalsrcdir)/lib/gssapi/krb5/prf.o
 
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/lib/gssapi/krb5/gsskrb5-private.h, \
+  -q -P comment -p, \
+  $(HEIMDAL_GSSAPI_KRB5_OBJ_FILES:.o=.c), \
+  $(HEIMDAL_GSSAPI_KRB5_OBJ_FILES) $(HEIMDAL_GSSAPI_KRB5_OBJ_FILES:.o=.d) \
+))
+
 HEIMDAL_GSSAPI_OBJ_FILES = \
        $(HEIMDAL_GSSAPI_SPNEGO_OBJ_FILES) \
        $(HEIMDAL_GSSAPI_KRB5_OBJ_FILES) \
@@ -224,6 +290,7 @@ HEIMDAL_KRB5_OBJ_FILES = \
        $(heimdalsrcdir)/lib/krb5/free_host_realm.o \
        $(heimdalsrcdir)/lib/krb5/generate_seq_number.o \
        $(heimdalsrcdir)/lib/krb5/generate_subkey.o \
+       $(heimdalsrcdir)/lib/krb5/get_addrs.o \
        $(heimdalsrcdir)/lib/krb5/get_cred.o \
        $(heimdalsrcdir)/lib/krb5/get_default_principal.o \
        $(heimdalsrcdir)/lib/krb5/get_default_realm.o \
@@ -256,6 +323,7 @@ HEIMDAL_KRB5_OBJ_FILES = \
        $(heimdalsrcdir)/lib/krb5/pkinit.o \
        $(heimdalsrcdir)/lib/krb5/plugin.o \
        $(heimdalsrcdir)/lib/krb5/principal.o \
+       $(heimdalsrcdir)/lib/krb5/prog_setup.o \
        $(heimdalsrcdir)/lib/krb5/pac.o \
        $(heimdalsrcdir)/lib/krb5/prompter_posix.o \
        $(heimdalsrcdir)/lib/krb5/rd_cred.o \
@@ -280,8 +348,23 @@ HEIMDAL_KRB5_OBJ_FILES = \
        $(heimdalsrcdir)/lib/krb5/heim_err.o \
        $(heimdalsrcdir)/lib/krb5/k524_err.o \
        $(heimdalsrcdir)/lib/krb5/krb_err.o \
+       $(heimdalsrcdir)/lib/hcrypto/evp-aes-cts.o \
        $(heimdalbuildsrcdir)/krb5-glue.o
 
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/lib/krb5/krb5-protos.h, \
+  -E KRB5_LIB -q -P comment -o, \
+  $(HEIMDAL_KRB5_OBJ_FILES:.o=.c), \
+  $(HEIMDAL_KRB5_OBJ_FILES) $(HEIMDAL_KRB5_OBJ_FILES:.o=.d) \
+))
+
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/lib/krb5/krb5-private.h, \
+  -q -P comment -p, \
+  $(HEIMDAL_KRB5_OBJ_FILES:.o=.c), \
+  $(HEIMDAL_KRB5_OBJ_FILES) $(HEIMDAL_KRB5_OBJ_FILES:.o=.d) \
+))
+
 #######################
 # Start SUBSYSTEM HEIMDAL_HEIM_ASN1
 [SUBSYSTEM::HEIMDAL_HEIM_ASN1]
@@ -344,6 +427,7 @@ HEIMDAL_HCRYPTO_OBJ_FILES = \
        $(heimdalsrcdir)/lib/hcrypto/sha256.o \
        $(heimdalsrcdir)/lib/hcrypto/ui.o \
        $(heimdalsrcdir)/lib/hcrypto/evp.o \
+       $(heimdalsrcdir)/lib/hcrypto/evp-hcrypto.o \
        $(heimdalsrcdir)/lib/hcrypto/pkcs5.o \
        $(heimdalsrcdir)/lib/hcrypto/pkcs12.o \
        $(heimdalsrcdir)/lib/hcrypto/rand.o \
@@ -400,8 +484,25 @@ HEIMDAL_HX509_OBJG_FILES = \
        $(heimdalsrcdir)/lib/hx509/sel-lex.o \
        $(heimdalsrcdir)/lib/hx509/sel-gram.o
 
+$(heimdalsrcdir)/lib/hx509/sel-lex.c:: $(heimdalsrcdir)/lib/hx509/sel-gram.c
+dist:: $(heimdalsrcdir)/lib/hx509/sel-lex.c
+
 HEIMDAL_HX509_OBJ_FILES = $(HEIMDAL_HX509_OBJH_FILES) $(HEIMDAL_HX509_OBJG_FILES)
 
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/lib/hx509/hx509-protos.h, \
+  -R '^(_|^C)' -E HX509_LIB -q -P comment -o, \
+  $(HEIMDAL_HX509_OBJH_FILES:.o=.c), \
+  $(HEIMDAL_HX509_OBJH_FILES) $(HEIMDAL_HX509_OBJH_FILES:.o=.d) \
+))
+
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/lib/hx509/hx509-private.h, \
+  -q -P comment -p, \
+  $(HEIMDAL_HX509_OBJH_FILES:.o=.c), \
+  $(HEIMDAL_HX509_OBJH_FILES) $(HEIMDAL_HX509_OBJH_FILES:.o=.d) \
+))
+
 #######################
 # Start SUBSYSTEM HEIMDAL_WIND
 [SUBSYSTEM::HEIMDAL_WIND]
@@ -427,6 +528,46 @@ HEIMDAL_WIND_OBJ_FILES = \
 # End SUBSYSTEM HEIMDAL_WIND
 #######################
 
+$(HEIMDAL_WIND_OBJ_FILES) $(HEIMDAL_WIND_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/wind/map_table.h
+
+$(heimdalsrcdir)/lib/wind/map_table.h $(heimdalsrcdir)/lib/wind/map_table.c: $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/gen-map.py $(heimdalsrcdir)/lib/wind/stringprep.py
+       $(PYTHON) $(heimdalsrcdir)/lib/wind/gen-map.py $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/
+
+clean::
+       @rm -f $(heimdalsrcdir)/lib/wind/map_table.h $(heimdalsrcdir)/lib/wind/map_table.c
+
+$(HEIMDAL_WIND_OBJ_FILES) $(HEIMDAL_WIND_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/wind/errorlist_table.h
+
+$(heimdalsrcdir)/lib/wind/errorlist_table.h $(heimdalsrcdir)/lib/wind/errorlist_table.c: $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/gen-errorlist.py $(heimdalsrcdir)/lib/wind/stringprep.py
+       $(PYTHON) $(heimdalsrcdir)/lib/wind/gen-errorlist.py $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/
+
+clean::
+       @rm -f $(heimdalsrcdir)/lib/wind/errorlist_table.h $(heimdalsrcdir)/lib/wind/errorlist_table.c
+
+$(HEIMDAL_WIND_OBJ_FILES) $(HEIMDAL_WIND_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/wind/normalize_table.h
+
+$(heimdalsrcdir)/lib/wind/normalize_table.h $(heimdalsrcdir)/lib/wind/normalize_table.c: $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/CompositionExclusions-3.2.0.txt $(heimdalsrcdir)/lib/wind/gen-normalize.py
+       $(PYTHON) $(heimdalsrcdir)/lib/wind/gen-normalize.py $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/CompositionExclusions-3.2.0.txt $(heimdalsrcdir)/lib/wind/
+
+clean::
+       @rm -f $(heimdalsrcdir)/lib/wind/normalize_table.h $(heimdalsrcdir)/lib/wind/normalize_table.c
+
+$(HEIMDAL_WIND_OBJ_FILES) $(HEIMDAL_WIND_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/wind/combining_table.h
+
+$(heimdalsrcdir)/lib/wind/combining_table.h $(heimdalsrcdir)/lib/wind/combining_table.c: $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/gen-combining.py
+       $(PYTHON) $(heimdalsrcdir)/lib/wind/gen-combining.py $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/
+
+clean::
+       @rm -f $(heimdalsrcdir)/lib/wind/combining_table.h $(heimdalsrcdir)/lib/wind/combining_table.c
+
+$(HEIMDAL_WIND_OBJ_FILES) $(HEIMDAL_WIND_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/wind/bidi_table.h
+
+$(heimdalsrcdir)/lib/wind/bidi_table.h $(heimdalsrcdir)/lib/wind/bidi_table.c: $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/gen-bidi.py
+       $(PYTHON) $(heimdalsrcdir)/lib/wind/gen-bidi.py $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/
+
+clean::
+       @rm -f $(heimdalsrcdir)/lib/wind/bidi_table.h $(heimdalsrcdir)/lib/wind/bidi_table.c
+
 [SUBSYSTEM::HEIMDAL_ROKEN_GETPROGNAME]
 
 HEIMDAL_ROKEN_GETPROGNAME_OBJ_FILES = $(heimdalsrcdir)/lib/roken/getprogname.o
@@ -461,6 +602,7 @@ HEIMDAL_ROKEN_OBJ_FILES = \
        $(heimdalsrcdir)/lib/roken/dumpdata.o \
        $(heimdalsrcdir)/lib/roken/emalloc.o \
        $(heimdalsrcdir)/lib/roken/ecalloc.o \
+       $(heimdalsrcdir)/lib/roken/getarg.o \
        $(heimdalsrcdir)/lib/roken/get_window_size.o \
        $(heimdalsrcdir)/lib/roken/h_errno.o \
        $(heimdalsrcdir)/lib/roken/issuid.o \
@@ -473,6 +615,7 @@ HEIMDAL_ROKEN_OBJ_FILES = \
        $(heimdalsrcdir)/lib/roken/roken_gethostby.o \
        $(heimdalsrcdir)/lib/roken/signal.o \
        $(heimdalsrcdir)/lib/roken/vis.o \
+       $(heimdalsrcdir)/lib/roken/setprogname.o \
        $(heimdalsrcdir)/lib/roken/strlwr.o \
        $(heimdalsrcdir)/lib/roken/strsep_copy.o \
        $(heimdalsrcdir)/lib/roken/strsep.o \
@@ -487,6 +630,16 @@ HEIMDAL_ROKEN_OBJ_FILES = \
        $(heimdalsrcdir)/lib/roken/xfree.o \
        $(heimdalbuildsrcdir)/replace.o
 
+$(HEIMDAL_ROKEN_OBJ_FILES) $(HEIMDAL_ROKEN_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/roken/roken.h
+$(HEIMDAL_ROKEN_OBJ_FILES:.o=.ho) $(HEIMDAL_ROKEN_OBJ_FILES:.o=.hd):: $(heimdalsrcdir)/lib/roken/roken.h
+
+$(heimdalsrcdir)/lib/roken/roken.h:
+       @echo 'Creating $(heimdalsrcdir)/lib/roken/roken.h'
+       @echo '#include "heimdal_build/roken.h"' > $(heimdalsrcdir)/lib/roken/roken.h
+
+clean::
+       @rm -f $(heimdalsrcdir)/lib/roken/roken.h
+
 #######################
 # Start SUBSYSTEM HEIMDAL_COM_ERR
 [SUBSYSTEM::HEIMDAL_COM_ERR]
@@ -503,7 +656,7 @@ HEIMDAL_COM_ERR_OBJ_FILES = \
 # Start BINARY asn1_compile
 [BINARY::asn1_compile]
 USE_HOSTCC = YES
-PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN_GETPROGNAME_H LIBREPLACE_NETWORK
+PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN LIBREPLACE_NETWORK
 
 ASN1C = $(builddir)/bin/asn1_compile
 
@@ -522,38 +675,32 @@ asn1_compile_ASN1_OBJ_FILES = \
        $(heimdalsrcdir)/lib/asn1/parse.ho \
        $(heimdalsrcdir)/lib/asn1/lex.ho
 
+$(heimdalsrcdir)/lib/asn1/lex.c:: $(heimdalsrcdir)/lib/asn1/parse.c
+dist:: $(heimdalsrcdir)/lib/asn1/lex.c
+
 asn1_compile_OBJ_FILES = \
        $(asn1_compile_ASN1_OBJ_FILES) \
-       $(heimdalsrcdir)/lib/roken/emalloc.ho \
-       $(heimdalsrcdir)/lib/roken/getarg.ho \
-       $(heimdalsrcdir)/lib/roken/setprogname.ho \
-       $(heimdalsrcdir)/lib/roken/strupr.ho \
-       $(heimdalsrcdir)/lib/roken/get_window_size.ho \
-       $(heimdalsrcdir)/lib/roken/estrdup.ho \
-       $(heimdalsrcdir)/lib/roken/ecalloc.ho \
        $(heimdalsrcdir)/lib/vers/print_version.ho \
        $(socketwrappersrcdir)/socket_wrapper.ho \
        $(heimdalbuildsrcdir)/replace.ho
 
 $(asn1_compile_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/asn1 -I$(heimdalsrcdir)/lib/roken -I$(socketwrappersrcdir)
 
+$(eval $(call heimdal_proto_header_template, \
+  $(heimdalsrcdir)/lib/asn1/der-protos.h, \
+  -q -P comment -o, \
+  $(HEIMDAL_HEIM_ASN1_DER_OBJ_FILES:.o=.c), \
+  $(asn1_compile_ASN1_OBJ_FILES) $(asn1_compile_ASN1_OBJ_FILES:.ho=.hd) \
+))
+
 # End BINARY asn1_compile
 #######################
 
-#######################
-# Start SUBSYSTEM HEIMDAL_COM_ERR_COMPILE_LEX
-[SUBSYSTEM::HEIMDAL_COM_ERR_COMPILE_LEX]
-CFLAGS = -I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/com_err -I$(heimdalsrcdir)/lib/roken  -I$(socketwrappersrcdir)
-# End SUBSYSTEM HEIMDAL_COM_ERR_COMPILE_LEX
-#######################
-
-HEIMDAL_COM_ERR_COMPILE_LEX_OBJ_FILES = $(heimdalsrcdir)/lib/com_err/lex.ho 
-
 #######################
 # Start BINARY compile_et
 [BINARY::compile_et]
 USE_HOSTCC = YES
-PRIVATE_DEPENDENCIES = HEIMDAL_COM_ERR_COMPILE_LEX HEIMDAL_ROKEN_GETPROGNAME_H LIBREPLACE_NETWORK
+PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN LIBREPLACE_NETWORK
 # End BINARY compile_et
 #######################
 
@@ -561,15 +708,15 @@ ET_COMPILER = $(builddir)/bin/compile_et
 
 compile_et_OBJ_FILES = $(heimdalsrcdir)/lib/vers/print_version.ho \
        $(heimdalsrcdir)/lib/com_err/parse.ho \
+       $(heimdalsrcdir)/lib/com_err/lex.ho \
        $(heimdalsrcdir)/lib/com_err/compile_et.ho \
-       $(heimdalsrcdir)/lib/roken/getarg.ho \
-       $(heimdalsrcdir)/lib/roken/get_window_size.ho \
-       $(heimdalsrcdir)/lib/roken/strupr.ho \
-       $(heimdalsrcdir)/lib/roken/setprogname.ho \
        $(socketwrappersrcdir)/socket_wrapper.ho \
        $(heimdalbuildsrcdir)/replace.ho
 
-$(compile_et_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/roken
+$(compile_et_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/com_err -I$(heimdalsrcdir)/lib/roken  -I$(socketwrappersrcdir)
+
+$(heimdalsrcdir)/lib/com_err/lex.c:: $(heimdalsrcdir)/lib/com_err/parse.c
+dist:: $(heimdalsrcdir)/lib/com_err/lex.c
 
 mkinclude perl_path_wrapper.sh asn1_deps.pl lib/hdb/hdb.asn1 hdb_asn1 \$\(heimdalsrcdir\)/lib/hdb |
 mkinclude perl_path_wrapper.sh asn1_deps.pl lib/gssapi/spnego/spnego.asn1 spnego_asn1 \$\(heimdalsrcdir\)/lib/gssapi --sequence=MechTypeList |
@@ -607,12 +754,30 @@ PRIVATE_DEPENDENCIES = HEIMDAL_KRB5 HEIMDAL_NTLM
 #######################
 
 samba4kinit_OBJ_FILES = $(heimdalsrcdir)/kuser/kinit.o \
-       $(heimdalsrcdir)/lib/vers/print_version.o \
-       $(heimdalsrcdir)/lib/roken/setprogname.o \
-       $(heimdalsrcdir)/lib/roken/getarg.o 
+       $(heimdalsrcdir)/lib/vers/print_version.o 
 
 $(samba4kinit_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/roken
 
-dist:: $(heimdalsrcdir)/lib/asn1/lex.c $(heimdalsrcdir)/lib/com_err/lex.c \
-       $(heimdalsrcdir)/lib/asn1/parse.c $(heimdalsrcdir)/lib/com_err/parse.c \
-       $(heimdalsrcdir)/lib/hx509/sel-lex.c $(heimdalsrcdir)/lib/hx509/sel-gram.c
+#######################
+# Start BINARY compile_et
+[BINARY::samba4kpasswd]
+PRIVATE_DEPENDENCIES = HEIMDAL_KRB5 HEIMDAL_NTLM
+# End BINARY compile_et
+#######################
+
+samba4kpasswd_OBJ_FILES = $(heimdalsrcdir)/kpasswd/kpasswd.o \
+       $(heimdalsrcdir)/lib/vers/print_version.o 
+
+$(samba4kpasswd_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/roken
+
+#######################
+# Start BINARY compile_et
+[BINARY::rkpty]
+PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN OPENPTY
+# End BINARY compile_et
+#######################
+
+rkpty_OBJ_FILES = $(heimdalsrcdir)/lib/roken/rkpty.o \
+       $(socketwrappersrcdir)/socket_wrapper.o
+
+$(rkpty_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/roken -DPACKAGE=\"Samba\"