Permalink
Browse files

makefile finally fixed... maybe

  • Loading branch information...
1 parent 6132779 commit 7a580637bcfa1486d35c8d0336df693710753e1b Alan Dipert committed Dec 18, 2008
Showing with 21 additions and 7 deletions.
  1. +5 −3 Makefile
  2. +16 −4 patches/fastcgic-cgic.patch
View
@@ -19,20 +19,22 @@ all: jsonptunnel.fcgi
cgi: jsonptunnel.cgi
+fcgi: CFLAGS+=$(FCGI_INCLUDE)
+fcgi: CFLAGS+=-DUSE_FASTCGI=1
fcgi: jsonptunnel.fcgi
jsonptunnel.cgi: $(OBJECTS) libcgic
$(CC) $(CFLAGS) $(INCLUDE) -o jsonptunnel.cgi $(OBJECTS) $(LIBS)
jsonptunnel.fcgi: $(OBJECTS) libcgic
- $(CC) $(CFLAGS) -DUSE_FASTCGI=1 $(FCGI_INCLUDE) $(INCLUDE) -o jsonptunnel.fcgi $(OBJECTS) $(LIBS) $(FCGI_LIBS)
+ $(CC) $(CFLAGS) $(INCLUDE) -o jsonptunnel.fcgi $(OBJECTS) $(LIBS) $(FCGI_LIBS)
libcgic:
- $(QUIET_SUBDIR0)cgic $(QUIET_SUBDIR1) libcgic.a
+ $(QUIET_SUBDIR0)cgic CFLAGS='$(CFLAGS)' $(QUIET_SUBDIR1) libcgic.a
get-cgic:
curl $(CGIC_URL) | tar -xz && rm -rf cgic && mv cgic$(CGIC_VER) cgic
patch cgic/cgic.c patches/fastcgic-cgic.patch
clean:
- rm -f *.o *.a jsonptunnel.fcgi jsonptunnel.cgi
+ rm -f *.o *.a jsonptunnel.fcgi jsonptunnel.cgi cgic/libcgic.a cgic/cgic.o
@@ -1,6 +1,18 @@
---- cgic.c 2004-11-15 08:57:59.000000000 -0800
-+++ cgic.c.patched 2008-12-18 08:19:02.000000000 -0800
-@@ -120,7 +120,11 @@
+--- /Users/alan/Projects/src/cgic205/cgic.c 2004-11-15 08:57:59.000000000 -0800
++++ cgic/cgic.c 2008-12-18 11:13:58.000000000 -0800
+@@ -22,7 +22,11 @@
+ #define CGICDEBUGEND
+ #endif /* CGICDEBUG */
+
++#ifdef USE_FASTCGI
++#include <fcgi_stdio.h>
++#else
+ #include <stdio.h>
++#endif
+ #include <string.h>
+ #include <ctype.h>
+ #include <stdlib.h>
+@@ -120,7 +124,11 @@
static int cgiStrBeginsNc(char *s1, char *s2);
int main(int argc, char *argv[]) {
@@ -12,7 +24,7 @@
char *cgiContentLengthString;
char *e;
cgiSetupConstants();
-@@ -284,9 +288,17 @@
+@@ -284,9 +292,17 @@
#endif /* CGICDEBUG */
}
}

0 comments on commit 7a58063

Please sign in to comment.