Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zdavatz/809611 to your computer and use it in GitHub Desktop.
Save zdavatz/809611 to your computer and use it in GitHub Desktop.
Makefile mod_ruby with MinGW for Windows Vista
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
LDFLAGS=-L"$(APACHE_ROOT)\lib" -L"$(RUBY_ROOT)\lib"
LIBS= -llibapr-1 -llibaprutil-1 -llibhttpd -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