diff options
| author | Daniel Bovensiepen <[email protected]> | 2012-09-21 19:56:28 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2012-09-21 19:56:28 +0800 |
| commit | d6f2f55b46ceddd986e7ba42fb8269aef0ca8e77 (patch) | |
| tree | 9e3a405436789e9c782a6c4c00eafed4301df809 /mrbgems/Makefile | |
| parent | f93572c531c1e69dc0c5d2c2bfd03fc83044158c (diff) | |
| download | mruby-d6f2f55b46ceddd986e7ba42fb8269aef0ca8e77.tar.gz mruby-d6f2f55b46ceddd986e7ba42fb8269aef0ca8e77.zip | |
Add Support for Ruby Extensions, C Extensions and Test Integration
Diffstat (limited to 'mrbgems/Makefile')
| -rw-r--r-- | mrbgems/Makefile | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/mrbgems/Makefile b/mrbgems/Makefile index 0f2908ab9..1cb5b8a83 100644 --- a/mrbgems/Makefile +++ b/mrbgems/Makefile @@ -17,29 +17,31 @@ export AR = ar .PHONY : all all : $(INIT).o all_gems -$(MMAKER_BIN) : $(MMAKER).o - @echo "Build the generator which creates the driver and Gem Makefile" - $(LL) -o $@ $(CC_FLAGS) $< +all_gems : g/Makefile + @echo "Build all gems" + $(MAKE) -C g -$(MMAKER).o : $(MMAKER).c - $(CC) $(CC_FLAGS) -MMD -c $< -o $@ +g/Makefile : $(MMAKER_BIN) + @echo "Generate Gem Makefile" + $(MMAKER_BIN) makefile > $@ $(INIT).c : $(MMAKER_BIN) @echo "Generate Gem driver" $(MMAKER_BIN) $(INIT) > $@ $(INIT).o : $(INIT).c - @echo "Build the driver which initiailizes all gems" - gcc $(CC_FLAGS) -c $< -o $@ + @echo "Build the driver which initializes all gems" + $(CC) $(CC_FLAGS) -MMD -c $< -o $@ $(AR) rs $(LIBR) $@ -g/Makefile : - @echo "Generate Gem Makefile" - $(MMAKER_BIN) makefile > $@ +# Generator -all_gems : $(MMAKER_BIN) g/Makefile - @echo "Build all gems" - $(MAKE) -C g +$(MMAKER_BIN) : $(MMAKER).o + @echo "Build the generator which creates the driver and Gem Makefile" + $(LL) -o $@ $(CC_FLAGS) $< + +$(MMAKER).o : $(MMAKER).c + $(CC) $(CC_FLAGS) -MMD -c $< -o $@ test : @$(MAKE) test -C g |
