EMILE/Rules.mk

37 lines
715 B
Makefile
Raw Normal View History

2005-11-18 00:06:31 +00:00
#
# (c) 2005 Laurent Vivier <Laurent@lvivier.info>
2005-11-18 00:06:31 +00:00
#
2005-11-30 00:41:59 +00:00
OBJS = $(patsubst %.sgml,%.8.gz,$(patsubst %.S,%.o,$(SOURCES:.c=.o)))
2005-11-16 13:57:01 +00:00
MODULE ?= $(shell basename $(TOP))
2005-11-16 13:57:01 +00:00
2005-11-30 00:27:37 +00:00
DISTFILES ?= $(SOURCES) $(HEADERS) Makefile
2005-11-16 13:57:01 +00:00
2005-11-26 09:21:56 +00:00
$(LIBRARY): $(LIBRARY)($(patsubst %.S,%.o,$(SOURCES:.c=.o)))
2005-11-16 13:57:01 +00:00
%.8: %.sgml
docbook-to-man $< > $@
%.8.gz: %.8
gzip -9c $< > $@
dist:
2005-12-01 13:48:47 +00:00
@echo TAR $(MODULE)
@for file in $(DISTFILES); do \
2005-11-16 13:57:01 +00:00
dir=$$(dirname $$file); \
if [ "$$dir" != "" ] ; then \
mkdir -p $(DISTDIR)/$(MODULE)/$$dir; \
fi; \
cp -p $$file $(DISTDIR)/$(MODULE)/$$file; \
done
ifdef TARGET
clean:
cd $(TARGET) && \
2005-11-30 00:41:59 +00:00
rm -f $(OBJS) $(PROGRAMS) $(LIBRARY)
2005-11-16 13:57:01 +00:00
else
clean:
2005-11-30 00:41:59 +00:00
rm -f $(OBJS) $(PROGRAMS) $(LIBRARY) $(CLEAN) $(LIBRARIES)
2005-11-16 13:57:01 +00:00
endif