From: lufia via GitGitGadget Date: Sat, 03 Aug 2019 23:52:13 GMT Subject: [PATCH 6/6] Add mkfile to build git and subcommands for Plan 9 Message-ID: <04949713061ba95784b5523c6ce57542a8e87abe.1564876327.git.gitgitgadget@gmail.com> In-Reply-To: From: lufia Signed-off-by: lufia --- mkfile | 195 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 mkfile diff --git a/mkfile b/mkfile new file mode 100644 index 0000000000..f0b06437ed --- /dev/null +++ b/mkfile @@ -0,0 +1,195 @@ +$target + +${CFILES:builtin/%.c=$O.git-%} ${X_CFILES:%=$O.git-%}:D: plan9/wrap.c + for(i in $target) + $CC -FTVw -o $i $prereq + +$O.git-credential-store: credential-store.$O common-main.$O $LIB + $LD $LDFLAGS -o $target $prereq + +$O.git-http-fetch: http-fetch.$O http.$O http-walker.$O common-main.$O $LIB + $LD $LDFLAGS -o $target $prereq + +$O.git-http-push: http-push.$O http.$O common-main.$O $LIB + $LD $LDFLAGS -o $target $prereq + +git-http-%.$O: http-%.c + $CC $CFLAGS -o $target $prereq + +$O.git-remote-http: remote-curl.$O http.$O http-walker.$O common-main.$O $LIB + $LD $LDFLAGS -o $target $prereq + +$O.git-remote-https: remote-curl.$O http.$O http-walker.$O common-main.$O $LIB + $LD $LDFLAGS -o $target $prereq + +$O.git-remote-ftp: remote-curl.$O http.$O http-walker.$O common-main.$O $LIB + $LD $LDFLAGS -o $target $prereq + +$O.git-remote-ftps: remote-curl.$O http.$O http-walker.$O common-main.$O $LIB + $LD $LDFLAGS -o $target $prereq + +# git should be copied into both $BIN and $OBJBIN +git.install:V: $O.git + cp $O.git $OBJBIN/git + +$LIBGIT: $LIBGITOBJ + ar vu $target $newmember + +$LIBXDIFF: $LIBXDIFFOBJ + ar vu $target $newmember + +%.$O: %.c + $CC $CFLAGS -o $target $stem.c + +$LIBGIT(%.$O):N: %.$O + +$LIBXDIFF(%.$O):N: %.$O + +clean:V: + rm -f *.[$OS] [$OS].out y.tab.? lex.yy.c y.debug y.output $CLEANFILES + rm -f */*.[$OS] */*/*.[$OS] -- gitgitgadget