Rev | Line | |
---|
[1337] | 1 | # $Id: build.gmk,v 1.3 2006/08/08 05:11:44 kmura Exp $ |
---|
| 2 | # =========================================================== |
---|
| 3 | # Script for building a module |
---|
| 4 | # =========================================================== |
---|
| 5 | headers := $(wildcard *.hh) |
---|
| 6 | sources := $(wildcard *.cc) |
---|
| 7 | objects := $(patsubst %.cc, %.o, $(sources)) |
---|
| 8 | |
---|
| 9 | .PHONY: clean debug |
---|
| 10 | |
---|
| 11 | # building module... |
---|
| 12 | ifdef MODULE |
---|
| 13 | module_name := $(MODULE).$(modext) |
---|
| 14 | |
---|
| 15 | $(module_name) : $(objects) |
---|
| 16 | $(build-module) |
---|
| 17 | endif |
---|
| 18 | |
---|
| 19 | # building shared library... |
---|
| 20 | ifdef LIBRARY |
---|
| 21 | module_name := $(LIBRARY).$(soext) |
---|
| 22 | |
---|
| 23 | $(module_name) : $(objects) |
---|
| 24 | $(build-library) |
---|
| 25 | endif |
---|
| 26 | |
---|
| 27 | module : $(module_name) |
---|
| 28 | |
---|
| 29 | clean : |
---|
| 30 | @-rm -f $(module_name) |
---|
| 31 | @-rm -f $(objects) |
---|
| 32 | |
---|
| 33 | debug: |
---|
| 34 | @echo debug... |
---|
| 35 | |
---|
Note: See
TracBrowser
for help on using the repository browser.