summaryrefslogtreecommitdiff
path: root/src/create_make.code.stuff
blob: 9d8ea5edfe1758a571b8dac2e667575fe86e84fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# These are commands which can be used to automatically create make.code.defn
# and make.code.deps stuff where there are subdirectories.
# Hopefully the finalmake system won't need these -- Tom
#

find . -name '*.c' -o -name '*.cc' | perl -p -e 's:\./::' | grep -v datestamp.c | awk 'BEGIN {print "SRCS=\\"}; {print $0 "\\"} END {print
""};' - > make.code.defn

find . -name '*.c' | perl -p -e 's,(.*)\.(.*),\1\.o:\$(SRCDIR)/\1.\2\n\t\$(CC) \$(CFLAGS) -o \$\@ -c \$< \$(addprefix -I\,\$(INC_DIRS)),' > make.code.deps

find . -name '*.cc' | perl -p -e 's,(.*)\.(.*),\1\.o:\$(SRCDIR)/\1.\2\n\t\$(CXX) \$(CXXFLAGS) -o \$\@ -c \$< \$(addprefix -I\,\$(INC_DIRS)),'  >> make.code.deps