Update of /cvsroot/pdatabase/pdb/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2022/src
Modified Files:
Makefile
Log Message:
Updated makefile to handle target clean better
Index: Makefile
===================================================================
RCS file: /cvsroot/pdatabase/pdb/src/Makefile,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Makefile 3 Mar 2005 20:52:20 -0000 1.6
+++ Makefile 1 Oct 2005 01:16:54 -0000 1.7
@@ -29,11 +29,20 @@
OBJS = $(SRC_FILES:%.c=%.o)
DOBJS = $(OBJS:%.o=d_%.o)
+# Need this for the 'clean' target.
+EXISTING_OBJS = $(wildcard *.o)
+
all: $(BIN)
debug: $(DBIN)
clean:
- @rm *.o
+ @if [ ! -z "$(EXISTING_OBJS)" ]; \
+ then \
+ rm *.o ; \
+ echo "Cleaned files."; \
+ else \
+ echo "No files to clean."; \
+ fi
$(BIN): $(OBJS)
$(CC) $(FLAGS) $(LDFLAGS) $(OBJS) -o $(BIN)
|