Fix build problems with generated files.

This commit is contained in:
Jeremy Rand 2019-07-21 00:28:39 -05:00
parent 5ab9363d2a
commit ad8862e2e2
16 changed files with 51 additions and 18 deletions

View File

@ -11,6 +11,9 @@ BUILDTARGET=$(DISKIMAGE)
EXECTARGET=executeGUI
DISKIMAGEDEST=.
AUXTYPE=
CFLAGS+=-i$(GENDIR)
vpath $(GENDIR)
ifeq ($(TARGETTYPE),shell)
FILETYPE=exe
@ -46,7 +49,7 @@ else ifeq ($(TARGETTYPE),xcmd)
endif
ASM_SRCS=$(patsubst ./%, %, $(wildcard $(addsuffix /*.s, $(SRCDIRS))))
ASM_SRCS=$(patsubst $(GENDIR)/%, %, $(patsubst ./%, %, $(wildcard $(addsuffix /*.s, $(SRCDIRS)))))
ifeq ($(ASSEMBLER),orcam)
ASM_MACROS=$(patsubst %.s, $(OBJDIR)/%.macros, $(ASM_SRCS))
@ -59,12 +62,12 @@ ifeq ($(ASSEMBLER),orcam)
endif
C_ROOTS=$(patsubst %.c, $(OBJDIR)/%.root, $(ROOTCFILE))
C_SRCS+=$(filter-out $(ROOTCFILE), $(patsubst ./%, %, $(wildcard $(addsuffix /*.c, $(SRCDIRS)))))
C_SRCS+=$(filter-out $(ROOTCFILE), $(patsubst $(GENDIR)/%, %, $(patsubst ./%, %, $(wildcard $(addsuffix /*.c, $(SRCDIRS))))))
C_OBJS=$(patsubst %.c, $(OBJDIR)/%.a, $(C_SRCS))
C_DEPS=$(patsubst %.c, $(OBJDIR)/%.d, $(ROOTCFILE)) $(patsubst %.c, $(OBJDIR)/%.d, $(C_SRCS))
endif
REZ_SRCS=$(patsubst ./%, %, $(wildcard $(addsuffix /*.rez, $(SRCDIRS))))
REZ_SRCS=$(patsubst $(GENDIR)/%, %, $(patsubst ./%, %, $(wildcard $(addsuffix /*.rez, $(SRCDIRS)))))
REZ_DEPS=$(patsubst %.rez, $(OBJDIR)/%.rez.d, $(REZ_SRCS))
REZ_OBJS=$(patsubst %.rez, $(OBJDIR)/%.r, $(REZ_SRCS))
@ -186,18 +189,33 @@ executeShell: all
$(OBJDIR)/%.a: %.c
$(COMPILE) $< $(@:.a=) $(CFLAGS) --noroot
$(OBJDIR)/%.a: $(GENDIR)/%.c
$(COMPILE) $< $(@:.a=) $(CFLAGS) --noroot
$(OBJDIR)/%.root: %.c
$(COMPILE) $< $(@:.root=) $(CFLAGS)
$(OBJDIR)/%.root: $(GENDIR)/%.c
$(COMPILE) $< $(@:.root=) $(CFLAGS)
$(OBJDIR)/%.ROOT: %.s
MACGENFLAGS="$(MACGENFLAGS)" MACGENMACROS="$(MACGENMACROS)" $(ASSEMBLE) $< $(@:.ROOT=) $(ASMFLAGS)
$(OBJDIR)/%.ROOT: $(GENDIR)/%.s
MACGENFLAGS="$(MACGENFLAGS)" MACGENMACROS="$(MACGENMACROS)" $(ASSEMBLE) $< $(@:.ROOT=) $(ASMFLAGS)
$(OBJDIR)/%.r: %.rez
$(REZ) $< $(@:.r=) $(REZFLAGS)
ifneq ($(RLINT_PATH),)
$(ORCA) $(RLINT_PATH) $@
endif
$(OBJDIR)/%.r: $(GENDIR)/%.rez
$(REZ) $< $(@:.r=) $(REZFLAGS)
ifneq ($(RLINT_PATH),)
$(ORCA) $(RLINT_PATH) $@
endif
$(OBJS): Makefile
# Include the C and rez dependencies which were generated from the last build

View File

@ -189,7 +189,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -195,7 +195,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -213,7 +213,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -195,7 +195,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -191,7 +191,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -203,7 +203,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -233,7 +233,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -146,7 +146,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -203,7 +203,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -146,7 +146,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -191,7 +191,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -197,7 +197,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -215,7 +215,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -197,7 +197,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>

View File

@ -146,7 +146,8 @@
extended=double
pascal=""</string>
<key>HEADER_SEARCH_PATHS</key>
<string>$GOLDEN_GATE/Libraries/ORCACDefs
<string>$TEMP_ROOT/___PACKAGENAME___.build/$CONFIGURATION/___PACKAGENAME___.build/DerivedSources
$GOLDEN_GATE/Libraries/ORCACDefs
~/Library/GoldenGate/Libraries/ORCACDefs
/Library/GoldenGate/Libraries/ORCACDefs
~/GoldenGate/Libraries/ORCACDefs</string>