2001-01-11 00:32:10 +08:00
|
|
|
|
|
|
|
all : $(MAKEDEPEND) $(TARGET) $(LIB)
|
|
|
|
|
|
|
|
$(TARGET) : $(OBJS)
|
|
|
|
$(C++) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
|
|
|
|
|
|
|
|
$(LIB) : $(OBJS)
|
|
|
|
$(C++) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
|
|
|
|
|
|
|
|
clean :
|
|
|
|
rm -f $(OBJS) core $(TARGET) $(MAKEDEPEND)
|
|
|
|
touch $(MAKEDEPEND)
|
|
|
|
|
|
|
|
clobber : clean
|
|
|
|
rm -f $(TARGET) a.out $(LIB)
|
|
|
|
|
|
|
|
to_unix :
|
|
|
|
for f in *.cpp ; do to_unix $$f $$f; done
|
|
|
|
for f in *.h ; do to_unix $$f $$f; done
|
|
|
|
|
2001-09-20 05:08:56 +08:00
|
|
|
beautify :
|
|
|
|
for f in *.cpp ; do mv $$f $$f.bak; bcpp $$f.bak $$f; rm $$f.bak; done
|
|
|
|
for f in *.h ; do mv $$f $$f.bak; bcpp $$f.bak $$f; rm $$f.bak; done
|
|
|
|
|
|
|
|
|
2001-01-11 00:32:10 +08:00
|
|
|
# force it
|
|
|
|
depend :
|
|
|
|
$(C++) $(C++FLAGS) -M $(C++FILES) $(CFILES) > $(MAKEDEPEND)
|
|
|
|
|
|
|
|
$(MAKEDEPEND) : $(C++FILES) $(CFILES)
|
|
|
|
$(C++) $(C++FLAGS) -M $(C++FILES) $(CFILES) > $(MAKEDEPEND)
|
|
|
|
|
|
|
|
%.o : %.cpp
|
|
|
|
$(C++) $(C++FLAGS) -c $*.cpp -o $*.o
|
|
|
|
|
2001-09-20 05:08:56 +08:00
|
|
|
%.o : %.c
|
|
|
|
$(C++) $(C++FLAGS) -c $*.c -o $*.o
|
|
|
|
|
2001-01-11 00:32:10 +08:00
|
|
|
docs:
|
|
|
|
[ "$(TARGET_BASENAME)" != "" ] && \
|
2001-09-20 05:08:56 +08:00
|
|
|
mkdir -p ../../doc/doc++/$(TARGET_BASENAME) && \
|
|
|
|
doc++ -d ../../doc/doc++/$(TARGET_BASENAME) -H -A ../../include/$(TARGET_BASENAME)/* && \
|
|
|
|
echo $(TARGET_BASENAME) HTML documentation created in ../../doc/doc++/$(TARGET_BASENAME)
|
2001-01-11 00:32:10 +08:00
|
|
|
|
|
|
|
install : home
|
|
|
|
@ make __install
|
|
|
|
|
|
|
|
instlinks : home
|
|
|
|
@ make __instlinks
|
|
|
|
|
|
|
|
instclean : home
|
|
|
|
@ make __instclean
|
|
|
|
|
|
|
|
|
|
|
|
home :
|
|
|
|
@ [ -n "$(OSGHOME)" ] || (echo ; echo "-------------> Please define OSGHOME"; echo)
|
|
|
|
@ [ -n "$(OSGHOME)" ] && echo > /dev/null;
|
|
|
|
|
|
|
|
sinclude $(INSTRULES)
|
|
|
|
|
|
|
|
include $(MAKEDEPEND)
|