Hello,
I am having trouble modifying the makefile listed below to also delete
any files that start with the phrase: Sorted_
Any help is appreciated.
Thanks,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
CC := g++
DEPS := customErrorClass.h
src = $(wildcard *.cpp)
obj = $(src:.cpp=.o)
$(info $(src) $(origin src))
Jones_EmployeeFinal: $(obj)
$(CC) -o $@ $^
.PHONY: clean
clean:
rm -f $(obj) Jones_EmployeeFinal
|
Last edited on
What do you mean by that?
Don't compile source files with 'Sorted_' in the filename?
Don't compile source files with 'Sorted_' somewhere in the program text?
Hi Salem
What i meant was that when the program runs it created binary output files with file names such as Sorted_file1.dat Sorted_file2.dat, etc.
when doing a make clean i wanted to delete them.
I think adding rm -f Sorted_*.* under the current clean would accomplish the task unless you have a better way.
Thanks,