diff options
author | Franklin Wei <git@fwei.tk> | 2017-02-09 22:34:20 -0500 |
---|---|---|
committer | Franklin Wei <git@fwei.tk> | 2017-02-09 22:36:05 -0500 |
commit | abd75a17d18c0779b59f64a612f9226b62af5823 (patch) | |
tree | 9c40ed19572a3e86ec5b379f68276e362405897e | |
parent | 882921efb64218e9b8cc3a7d9c7308734f9b12f3 (diff) |
puzzles: fix up makefile
- rewrote a bunch of repetitive rules with a pattern rule
Change-Id: I86a61a7ed8398f18789e5efaf4996d9eafd50651
-rw-r--r-- | apps/plugins/puzzles/puzzles.make | 51 |
1 files changed, 6 insertions, 45 deletions
diff --git a/apps/plugins/puzzles/puzzles.make b/apps/plugins/puzzles/puzzles.make index ad2a8a068b..6f63f0a8ee 100644 --- a/apps/plugins/puzzles/puzzles.make +++ b/apps/plugins/puzzles/puzzles.make @@ -71,51 +71,12 @@ $(PUZZLES_OBJDIR)/puzzles.ovl: $(PUZZLES_OBJ) $(PUZZLES_OUTLDS) $(TLSFLIB) -lgcc $(PUZZLES_OVLFLAGS) $(call PRINTS,LD $(@F))$(call objcopy,$(basename $@).elf,$@) else -# todo: figure out how to do this with wildcards -$(PUZZLES_OBJDIR)/sgt-blackbox.rock: $(PUZZLES_OBJDIR)/blackbox.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-bridges.rock: $(PUZZLES_OBJDIR)/bridges.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-cube.rock: $(PUZZLES_OBJDIR)/cube.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-dominosa.rock: $(PUZZLES_OBJDIR)/dominosa.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-fifteen.rock: $(PUZZLES_OBJDIR)/fifteen.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-filling.rock: $(PUZZLES_OBJDIR)/filling.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-flip.rock: $(PUZZLES_OBJDIR)/flip.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-flood.rock: $(PUZZLES_OBJDIR)/flood.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-galaxies.rock: $(PUZZLES_OBJDIR)/galaxies.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-guess.rock: $(PUZZLES_OBJDIR)/guess.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-inertia.rock: $(PUZZLES_OBJDIR)/inertia.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-keen.rock: $(PUZZLES_OBJDIR)/keen.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-lightup.rock: $(PUZZLES_OBJDIR)/lightup.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-loopy.rock: $(PUZZLES_OBJDIR)/loopy.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-magnets.rock: $(PUZZLES_OBJDIR)/magnets.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-map.rock: $(PUZZLES_OBJDIR)/map.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-mines.rock: $(PUZZLES_OBJDIR)/mines.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-net.rock: $(PUZZLES_OBJDIR)/net.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-netslide.rock: $(PUZZLES_OBJDIR)/netslide.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-palisade.rock: $(PUZZLES_OBJDIR)/palisade.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-pattern.rock: $(PUZZLES_OBJDIR)/pattern.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-pearl.rock: $(PUZZLES_OBJDIR)/pearl.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-pegs.rock: $(PUZZLES_OBJDIR)/pegs.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-range.rock: $(PUZZLES_OBJDIR)/range.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-rect.rock: $(PUZZLES_OBJDIR)/rect.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-samegame.rock: $(PUZZLES_OBJDIR)/samegame.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-signpost.rock: $(PUZZLES_OBJDIR)/signpost.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-singles.rock: $(PUZZLES_OBJDIR)/singles.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-sixteen.rock: $(PUZZLES_OBJDIR)/sixteen.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-slant.rock: $(PUZZLES_OBJDIR)/slant.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-solo.rock: $(PUZZLES_OBJDIR)/solo.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-tents.rock: $(PUZZLES_OBJDIR)/tents.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-towers.rock: $(PUZZLES_OBJDIR)/towers.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-tracks.rock: $(PUZZLES_OBJDIR)/tracks.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-twiddle.rock: $(PUZZLES_OBJDIR)/twiddle.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-undead.rock: $(PUZZLES_OBJDIR)/undead.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-unequal.rock: $(PUZZLES_OBJDIR)/unequal.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-unruly.rock: $(PUZZLES_OBJDIR)/unruly.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-untangle.rock: $(PUZZLES_OBJDIR)/untangle.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) - -$(PUZZLES_OBJDIR)/sgt-group.rock: $(PUZZLES_OBJDIR)/unfinished/group.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-separate.rock: $(PUZZLES_OBJDIR)/unfinished/separate.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-slide.rock: $(PUZZLES_OBJDIR)/unfinished/slide.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) -$(PUZZLES_OBJDIR)/sgt-sokoban.rock: $(PUZZLES_OBJDIR)/unfinished/sokoban.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) +$(PUZZLES_OBJDIR)/sgt-%.rock: $(PUZZLES_OBJDIR)/%.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) + $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \ + $(filter %.o, $^) \ + $(filter %.a, $+) \ + -lgcc $(PLUGINLDFLAGS) + $(SILENT)$(call objcopy,$(BUILDDIR)/$*.elf,$@) endif # special pattern rule for compiling puzzles with extra flags |