Skip to content

Commit

Permalink
comments for top level Rules and java rules/dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
l-hoang committed Nov 22, 2016
1 parent 7348eb1 commit 293eabc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Rules.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Compiles the source file using the specified compiler + flags
# Note $< is the first specified dependency, in this case the source
compile: $(SRC)
$(CC) $(CFLAGS) $<

# Runs the code.
run: compile
$(RUNCMD) $(RUNFLAGS) $(TEST_FILE)

Expand Down
3 changes: 3 additions & 0 deletions java/Rules.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Specify how to compile + how to run
CC:=javac
CFLAGS:=
OBJ:=$(SRC:.java=.class)
RUNCMD:=java
RUNFLAGS:=-cp . $(OBJ:.class=)

# include the top level Rules.mk (note this is called from the context
# of the Makefile in a directory below this one)
include ../../Rules.mk
1 change: 1 addition & 0 deletions java/dummy/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Specify the source file
SRC:=Dummy.java

include ../Rules.mk

0 comments on commit 293eabc

Please sign in to comment.