Skip to content

Commit

Permalink
makefile improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dgollub committed Mar 27, 2015
2 parents ed16876 + f11a472 commit 87d0ff7
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
DC = dmd
DFLAGS = -wi -g
BUILD_DIR = build
INSTALL_DIR = /usr/local/bin

debug: DFLAGS += -debug
debug: all
Expand All @@ -11,18 +13,23 @@ all: promptd-path promptd-vcs

package: clean release
mkdir promptd
cp promptd-path promptd-vcs promptd
cp $(BUILD_DIR)/promptd-path $(BUILD_DIR)/promptd-vcs promptd
tar cf promptd.tar promptd
gzip -f9 promptd.tar
rm -r promptd

promptd-path: promptd-path.d help.d
$(DC) $(DFLAGS) -of$@ $^
@mkdir -p $(BUILD_DIR)
$(DC) $(DFLAGS) -of$(BUILD_DIR)/$@ $^

promptd-vcs: promptd-vcs.d help.d vcs.d time.d color.d git.d
$(DC) $(DFLAGS) -of$@ $^
@mkdir -p $(BUILD_DIR)
$(DC) $(DFLAGS) -of$(BUILD_DIR)/$@ $^

install: clean release
cp $(BUILD_DIR)/promptd-path $(BUILD_DIR)/promptd-vcs $(INSTALL_DIR)

clean:
rm -f promptd-path promptd-vcs *.o
rm -rf $(BUILD_DIR)

.PHONY: clean debug release all package
.PHONY: clean debug release all package install

0 comments on commit 87d0ff7

Please sign in to comment.