Skip to content

Commit

Permalink
Add Makefile to simplify building/installing module
Browse files Browse the repository at this point in the history
  • Loading branch information
mpokrywka committed Jan 30, 2010
1 parent d755f54 commit 0eeea51
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*~
*.slo
*.la
local-options.mk
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
-include local-options.mk

ifndef APXS
APXS := $(shell which apxs2)
endif

ifndef APXS
APXS := $(shell which apxs)
endif

ifndef APXS
$(error No apxs found in path, set APXS = /path/to/apxs in local-options.mk)
endif

all: local-shared-build

local-shared-build: module

module: .libs/mod_upload_progress.o

.libs/mod_upload_progress.o:
$(APXS) -c $(CFLAGS) mod_upload_progress.c

# install the shared object file into Apache
install: local-shared-build
$(APXS) -i $(CFLAGS) mod_upload_progress.la

# cleanup
.PHONY: clean
clean:
-rm -f mod_upload_progress.o mod_upload_progress.lo mod_upload_progress.slo mod_upload_progress.la
-rm -rf .libs/

0 comments on commit 0eeea51

Please sign in to comment.