mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
$(TOPDIR), make: Initial commit
After making most modules independent from the Hamlet tree, place Makefiles in a central location for more centralized control over the build process.
This commit is contained in:
commit
46c67d77fc
11 changed files with 206 additions and 0 deletions
76
make/rules.mk
Normal file
76
make/rules.mk
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# generic utility modules
|
||||
# (c) 2001 jannet it services
|
||||
# contact@jannet.de
|
||||
# $Id$
|
||||
|
||||
all.done: $(ALL)
|
||||
touch $@
|
||||
|
||||
%.done:
|
||||
make -C $(shell dirname $@) `basename $@`
|
||||
|
||||
$(LIBDIR):
|
||||
mkdir -p $@
|
||||
|
||||
#lib$(MOD)(%.o).a: %.c $(LIBDIR)
|
||||
# $(CC) $(CFLAGS) -c $< -o $*.o
|
||||
# $(AR) r $@ $*.o
|
||||
# $(RM) $*.o
|
||||
|
||||
lib%.so: %.o
|
||||
$(CC) $< $(LDFLAGS) -o $@
|
||||
|
||||
$(TOPDIR)/include:
|
||||
mkdir -p $@
|
||||
|
||||
$(TOPDIR)/include/%.h:%.h $(TOPDIR)/include
|
||||
cp $< $@
|
||||
|
||||
%.o: %.c %.h
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
%.o: %.cc %h
|
||||
$(CPP) $(CPPFLAGS) -c $<
|
||||
|
||||
$(EXE): $(OBJ) $(LIB)
|
||||
$(CC) $(OBJ) $(LDFLAGS) -o $@
|
||||
|
||||
$(LIBS):
|
||||
make -C $(LIBDIR) all
|
||||
|
||||
checkroot:
|
||||
test `whoami` = root
|
||||
|
||||
installexe: $(ALL) checkroot
|
||||
$(INSTALL) $(EXE) $(PREFIX)/bin/
|
||||
|
||||
installso: $(ALL) checkroot
|
||||
$(INSTALL) $(SHOBJS) $(PREFIX)/lib/
|
||||
|
||||
installsh: $(ALL)
|
||||
$(INSTALL) $(SHSCRIPTS) $(PREFIX)/bin/
|
||||
|
||||
tmpclean:
|
||||
rm -rf *.tmp
|
||||
|
||||
objclean:
|
||||
rm -rf core .*.o *.o *.a *.so
|
||||
|
||||
textclean: doneclean
|
||||
rm -rf $(TEXTCLEAN)
|
||||
|
||||
allclean:
|
||||
rm -rf $(ALL)
|
||||
|
||||
doneclean:
|
||||
rm -rf *.done
|
||||
|
||||
execlean: allclean objclean textclean
|
||||
|
||||
distclean: clean objclean textclean tmpclean
|
||||
|
||||
localclean:
|
||||
rm -rf $(CLEAN)
|
||||
|
||||
libclean:
|
||||
rm -rf $(LIB)
|
||||
Loading…
Add table
Add a link
Reference in a new issue