fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
1#!/bin/bash
2
3export LC_ALL="C"
4
5if test -f "Makefile.dep" ; then
6 mv -f "Makefile.dep" "Makefile.dep.old"
7fi
8
9{
10 echo "#define PCE_ENABLE_TUN 1"
11} > "src/config.h"
12
13find src -type f -name "*.c" -print |\
14grep -v "^src/arch/sim405/pceutils/" |\
15while read file ; do
16 echo "${file%.*}.o:"
17 makedepend -Y -f- -w0 -Isrc "$file" 2> /dev/null
18done |\
19grep "^src/.*:" |\
20sort -u |\
21{
22 printf '# Makefile.dep'
23
24 while read dst src ; do
25 if test -z "$src" ; then
26 printf '\n\n%s %s' "$dst" "${dst%.*}.c"
27 else
28 printf ' \\\n\t%s' "$src"
29 fi
30 done
31
32 echo
33} > "Makefile.dep"
34
35diff -Nu "Makefile.dep.old" "Makefile.dep" > "Makefile.dep.diff"
36
37rm -f "src/config.h"