mirror of
https://github.com/vivier/EMILE.git
synced 2025-01-03 12:31:57 +00:00
Move some generic Makefile parts
This commit is contained in:
parent
718f4054c5
commit
1bf043e22d
34
Rules.mk
Normal file
34
Rules.mk
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
OBJS = $(patsubst %.S,%.o,$(SOURCES:.c=.o))
|
||||||
|
|
||||||
|
MODULE ?= $(basename $(TOP))
|
||||||
|
|
||||||
|
DISTFILES ?= $(SOURCES) $(HEADERS) $(MANPAGES) Makefile
|
||||||
|
|
||||||
|
%.8: %.sgml
|
||||||
|
docbook-to-man $< > $@
|
||||||
|
|
||||||
|
%.8.gz: %.8
|
||||||
|
gzip -9c $< > $@
|
||||||
|
|
||||||
|
ifdef LIBRARY
|
||||||
|
$(LIBRARY): $(OBJS)
|
||||||
|
$(AR) rc $@ $^
|
||||||
|
endif
|
||||||
|
|
||||||
|
dist:
|
||||||
|
for file in $(DISTFILES); do \
|
||||||
|
dir=$$(dirname $$file); \
|
||||||
|
if [ "$$dir" != "" ] ; then \
|
||||||
|
mkdir -p $(DISTDIR)/$(MODULE)/$$dir; \
|
||||||
|
fi; \
|
||||||
|
cp -p $$file $(DISTDIR)/$(MODULE)/$$file; \
|
||||||
|
done
|
||||||
|
|
||||||
|
ifdef TARGET
|
||||||
|
clean:
|
||||||
|
cd $(TARGET) && \
|
||||||
|
rm -f $(OBJS) $(PROGRAMS) $(LIBRARY) $(MANPAGES)
|
||||||
|
else
|
||||||
|
clean:
|
||||||
|
rm -f $(OBJS) $(PROGRAMS) $(LIBRARY) $(MANPAGES)
|
||||||
|
endif
|
Loading…
Reference in New Issue
Block a user