Skip to content

Instantly share code, notes, and snippets.

@zdavatz
Created February 7, 2011 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zdavatz/814328 to your computer and use it in GitHub Desktop.
Save zdavatz/814328 to your computer and use it in GitHub Desktop.
Makefile mod_ruby MinGW Apache for Windows
APACHE_ROOT=C:/Apache2.2
RUBY_ROOT=C:/Ruby-1.8.6-oniguruma
SRCS = \
apache_cookie.c \
apache_multipart_buffer.c \
apache_request.c \
apachelib.c \
array_header.c \
bucket.c \
connection.c \
cookie.c \
error.c \
mod_ruby.c \
multival.c \
paramtable.c \
request.c \
ruby_config.c \
ruby_shared_stub.c \
server.c \
table.c \
upload.c \
uri.c
OBJS = $(SRCS:.c=.o)
CFLAGS=-I"$(APACHE_ROOT)\include" -I"$(RUBY_ROOT)\lib\ruby\1.8\i386-mingw32" -DWIN32 -mthreads
LDFLAGS=-L"$(APACHE_ROOT)\lib" -L"$(RUBY_ROOT)\lib"
LIBS= -llibapr-1i -llibaprutil-1i -llibhttpd-i -lmsvcrt-ruby18
.SUFFIXES: .c .o
all : mod_ruby.so
.c.o:
gcc -c $(CFLAGS) -o $@ $<
mod_ruby.so : $(OBJS)
gcc -shared -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
clean :
-@rm -f *.o *.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment