| 1 |
### ========================================================================== |
| 2 |
### $Id: Makefile,v 1.9 2004/01/25 21:59:42 hzeller Exp $ |
| 3 |
### FILE: lib/c++/Makefile - make the c++ library |
| 4 |
### brickOS - the independent LEGO Mindstorms OS |
| 5 |
### -------------------------------------------------------------------------- |
| 6 |
|
| 7 |
# our target |
| 8 |
LIBTARGET = c++ |
| 9 |
|
| 10 |
# sources |
| 11 |
CSOURCES = stub.c |
| 12 |
CXXSOURCES=mem.cpp |
| 13 |
|
| 14 |
## |
| 15 |
## no user servicable parts below |
| 16 |
## |
| 17 |
|
| 18 |
LIBRARY = lib$(LIBTARGET).a |
| 19 |
|
| 20 |
OBJECTS = $(CSOURCES:.c=.o) $(CXXSOURCES:.cpp=.o) |
| 21 |
|
| 22 |
|
| 23 |
all:: promote-stamp |
| 24 |
@# nothing to do here but do it silently |
| 25 |
|
| 26 |
promote-stamp: $(LIBRARY) |
| 27 |
cp -f $? ../ |
| 28 |
@touch $@ |
| 29 |
|
| 30 |
include ../../Makefile.common |
| 31 |
|
| 32 |
$(LIBRARY): $(OBJECTS) |
| 33 |
rm -f $@ |
| 34 |
$(AR) -sq $@ $(OBJECTS) |
| 35 |
|
| 36 |
.depend: $(CSOURCES) $(CXXSOURCES) |
| 37 |
$(MAKEDEPEND) $(CSOURCES) $(CXXSOURCES) > .depend |
| 38 |
|
| 39 |
depend:: .depend |
| 40 |
@# nothing to do here but do it silently |
| 41 |
|
| 42 |
clean: |
| 43 |
rm -f *.o *.map *.coff *.srec *.dis* *~ *.bak *.tgz *.s |
| 44 |
|
| 45 |
realclean: clean |
| 46 |
rm -f $(LIBRARY) ../$(LIBRARY) .depend |
| 47 |
@rm -f install-stamp promote-stamp tags TAGS |
| 48 |
|
| 49 |
install: install-stamp |
| 50 |
@# nothing to do here but do it silently |
| 51 |
|
| 52 |
install-stamp: $(LIBRARY) |
| 53 |
@if [ ! -d ${pkglibdir} ]; then \ |
| 54 |
mkdir -p ${pkglibdir}; \ |
| 55 |
fi |
| 56 |
cp -f $? ${pkglibdir}/$? |
| 57 |
@touch $@ |
| 58 |
|
| 59 |
uninstall: |
| 60 |
@rm -f install-stamp |
| 61 |
|
| 62 |
.PHONY: all promote-stamp depend clean realclean install install-stamp uninstall |
| 63 |
|
| 64 |
### -------------------------------------------------------------------------- |
| 65 |
### End of FILE: lib/c++/Makefile |
| 66 |
### ========================================================================== |