make: Introduced plasticd project compatibility

This commit is contained in:
Jan Lindemann 2001-07-27 22:02:40 +00:00 committed by Jan Lindemann
commit 61fe4a73d5
9 changed files with 45 additions and 31 deletions

View file

@ -23,8 +23,8 @@ lib%.so: %.o
$(TOPDIR)/include:
mkdir -p $@
$(TOPDIR)/include/%.h:%.h $(TOPDIR)/include
cp $< $@
$(TOPDIR)/include/%.h: $(TOPDIR)/include %.h
cp $(@F) $@
%.o: %.cpp
$(CPP) $(CPPFLAGS) -c $<
@ -38,16 +38,23 @@ $(EXE): $(OBJ) $(LIB)
$(LIBS):
make -C $(LIBDIR) all
checkroot:
test `whoami` = root
$(PREFIX) $(PREFIX)/%:
mkdir -p $@
installexe: $(ALL) checkroot
checkroot:
@if [ "$(CHECK_ROOT)" = true -o "$(CHECK_ROOT)" = TRUE ] ; then \
echo "Error: You can only do this if either" ;\
echo " a) you are user \"root\"" ;\
echo " b) the Makefile variable CHECK_ROOT does not contain \"true\" as value." ;\
fi
installexe: $(ALL) checkroot $(PREFIX)/bin
$(INSTALL) $(EXE) $(PREFIX)/bin/
installso: $(ALL) checkroot
installso: $(ALL) checkroot $(PREFIX)/lib
$(INSTALL) $(SHOBJS) $(PREFIX)/lib/
installsh: $(ALL)
installsh: $(ALL) checkroot $(PREFIX)/bin
$(INSTALL) $(SHSCRIPTS) $(PREFIX)/bin/
pckgclean: