2005-11-18 00:06:31 +00:00
|
|
|
#
|
2006-09-15 14:55:39 +00:00
|
|
|
# (c) 2005 Laurent Vivier <Laurent@lvivier.info>
|
2005-11-18 00:06:31 +00:00
|
|
|
#
|
|
|
|
|
2008-07-23 05:37:40 +00:00
|
|
|
OBJS = $(patsubst %.S,%.o,$(SOURCES:.c=.o))
|
2005-11-16 13:57:01 +00:00
|
|
|
|
2005-11-30 00:15:14 +00:00
|
|
|
MODULE ?= $(shell basename $(TOP))
|
2005-11-16 13:57:01 +00:00
|
|
|
|
2008-09-05 12:20:41 +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)))
|
|
|
|
|
2008-07-23 05:37:40 +00:00
|
|
|
%.gz: %
|
|
|
|
gzip -9f $<
|
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:
|
2008-09-05 12:20:41 +00:00
|
|
|
rm -f $(OBJS) $(PROGRAMS) $(LIBRARY) $(CLEAN) $(LIBRARIES)
|
2005-11-16 13:57:01 +00:00
|
|
|
endif
|