diff options
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -49,7 +49,7 @@ riscos: $(RUNIMAGE) $(RUNIMAGE) : $(OBJS_RISCOS) $(CC) -o $@ $(LDFLAGS_RISCOS) $^ -netsurf.zip: $(RUNIMAGE) +nstheme.zip: $(RUNIMAGE) rm nstheme.zip; riscos-zip -9vr, nstheme.zip !NSTheme # pattern rule for c source @@ -57,15 +57,19 @@ $(OBJDIR_RISCOS)/%.o : %.c @echo "==> $<" @$(CC) -o $@ -c $(CFLAGS_RISCOS) $< -# generate dependencies -depend : $(SOURCES_RISCOS) - -mkdir $(OBJDIR_RISCOS) - $(CC) -MM -MG $(CFLAGS_RISCOS) $^ | sed 's|.*\.o:|$(OBJDIR_RISCOS)/&|g' > depend +# Generate dependencies. +# To disable automatic regeneration of dependencies (eg. if perl is not +# available), remove */*.[ch] from the line below. +# Under RISC OS, you may require *Set UnixFS$sfix "", if perl gives +# "No such file or directory" errors. +depend: */*.[ch] + @echo "--> modified files $?" + @echo "--> updating dependencies" + @-mkdir -p $(OBJDIR_RISCOS) + @perl scandeps nstheme $(OBJDIR_RISCOS) -- $^ > depend + +include depend # remove generated files clean : - -rm $(OBJDIR_RISCOS) - -ifneq ($(OS),riscos) -include depend -endif + -rm $(OBJDIR_RISCOS)/* |