Skip to content

Commit

Permalink
top-level makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
spencersalazar committed Oct 4, 2012
1 parent fffeac3 commit 17a52d0
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions makefile
@@ -1,5 +1,8 @@

CHUGINS=ABSaturator Bitcrusher MagicSine
CHUGS=$(foreach CHUG,$(CHUGINS),$(CHUG)/$(CHUG).chug)

INSTALL_DIR=/usr/lib/chuck

ifneq ($(CK_TARGET),)
.DEFAULT_GOAL:=$(CK_TARGET)
Expand All @@ -8,11 +11,16 @@ MAKECMDGOALS:=$(.DEFAULT_GOAL)
endif
endif

osx: $(CHUGINS)
linux: $(CHUGINS)
win32: $(CHUGINS)
clean: $(CHUGINS)
osx: $(CHUGS)
linux: $(CHUGS)
win32: $(CHUGS)

$(CHUGS):
make -C $(dir $@) $(MAKECMDGOALS)

$(CHUGINS):
make -C $@ $(MAKECMDGOALS)
clean:
rm -rf $(addsuffix /*.o,$(CHUGINS)) $(CHUGS)

install: $(CHUGS)
mkdir -p $(INSTALL_DIR)
cp -rf $(CHUGS) $(INSTALL_DIR)

0 comments on commit 17a52d0

Please sign in to comment.