EMILE/Rules.mk

33 lines
720 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.gz: %.8
gzip -9c < $< > $@
2005-11-16 13:57:01 +00:00
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:
2007-09-07 09:04:40 +00:00
(cd $(TARGET) && rm -f $(OBJS) $(PROGRAMS) $(LIBRARY)) || true
2005-11-16 13:57:01 +00:00
else
clean:
rm -f $(OBJS) $(PROGRAMS) $(LIBRARY) $(CLEAN) $(LIBRARIES) $(MANPAGES) $(MANPAGES:.8.gz=.8)
2005-11-16 13:57:01 +00:00
endif