| 1 |
# |
| 2 |
# OpenAccess module Makefile |
| 3 |
# |
| 4 |
|
| 5 |
MODULE = oa |
| 6 |
MAGICDIR = .. |
| 7 |
SRCS = oa.c |
| 8 |
CXXSRCS = magicInit.cpp magicOA.cpp |
| 9 |
|
| 10 |
include ${MAGICDIR}/defs.mak |
| 11 |
|
| 12 |
#---------------------------------------- |
| 13 |
|
| 14 |
CXX_INCLUDES = -I. -I${OA}/oa/include |
| 15 |
|
| 16 |
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) |
| 17 |
|
| 18 |
DEP_FILES = $(addprefix .deps/,$(SRCS:.c=.P))\ |
| 19 |
$(addprefix .deps/,$(CXXSRCS:.cpp=.P)) |
| 20 |
|
| 21 |
-include ${DEP_FILES} |
| 22 |
|
| 23 |
%.o: %.cpp |
| 24 |
@echo '$(COMPILE) -c $<'; \ |
| 25 |
${CXX} ${CXX_CFLAGS} ${OTHER_CFLAGS} ${CXX_INCLUDES} -Wp,-MD,.deps/$(*F).pp -c $< |
| 26 |
@-cp .deps/$(*F).pp .deps/$(*F).P; \ |
| 27 |
tr ' ' '\012' < .deps/$(*F).pp \ |
| 28 |
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ |
| 29 |
>> .deps/$(*F).P; \ |
| 30 |
rm .deps/$(*F).pp |
| 31 |
|
| 32 |
clean: |
| 33 |
${RM} *.o |
| 34 |
${RM} -r .deps |
| 35 |
|
| 36 |
#------------------------------------------------------ |
| 37 |
include ${MAGICDIR}/rules.mak |