Permalink
Browse files

OK, simple makefile that works on cygwin at least.

  • Loading branch information...
1 parent 74aafca commit b7a4e44dbc4f4fcfcb99713ae7e8e25ff39922d8 @wesleyd committed Nov 10, 2009
Showing with 60 additions and 0 deletions.
  1. +26 −0 Makefile
  2. +17 −0 README
  3. +5 −0 charade.c
  4. +12 −0 depend.sh
View
@@ -0,0 +1,26 @@
+CC := gcc
+CFLAGS := -Wall -Werror -O2
+
+export CC CFLAGS
+
+all: charade.exe
+
+CFILES := $(wildcard *.c)
+#OBJFILES := $(patsubst %.c,%.o,$(CFILES))
+OBJFILES := $(CFILES:.c=.o)
+
+include $(OBJFILES:.o=.d)
+
+%d: %c
+ ./depend.sh . $<
+
+install: all
+ install charade.exe /usr/local/bin
+
+charade.exe: $(OBJFILES)
+ $(CC) $(CFLAGS) -o $@ $+
+
+clean:
+ rm -f charade.exe
+ rm -f *.o *.obj
+ rm -f *.d
View
17 README
@@ -0,0 +1,17 @@
+Charade is an ssh-agent in cygwin that proxies requests to pageant.
+
+If you don't use cygwin or pageant, you don't need charade.
+
+Background: I tolerate Windows XP. I actually quite like it. But it
+needs putty, and it needs cygwin to be usable. I used to maintain
+two separate sets of ssh keys: one for putty, which I kept in pageant,
+and another for cygwin's openssh, which I kept in ssh-agent/keychain.
+
+Eventually I got fed up maintaining two key pairs and charade was born.
+
+It's really just a program that pretends to be ssh-agent on one side
+and pretends to be putty on the other.
+
+How do you run it? Just like ssh-agent.
+
+Wesley Darlington, November 2009.
View
@@ -0,0 +1,5 @@
+int
+main(int argc, char **argv)
+{
+ return 0;
+}
View
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+DIR="$1"
+shift 1
+case "$DIR" in
+ "" | "." )
+ $CC -MM -MG "$@" | sed -e 's@^\(.*\)\.o:@\1.d \1.o:@'
+ ;;
+ *)
+ $CC -MM -MG "$@" | sed -e 's@^\(.*\)\.o:@$DIR/\1.d $DIR/\1.o:@'
+ ;;
+esac

0 comments on commit b7a4e44

Please sign in to comment.