Skip to content

Commit

Permalink
Fixed dependencies in the makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlexSee committed Mar 24, 2018
1 parent d5a768a commit 1b94de2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ BOOST_DIR = "/home/alex/boost_1_65_1"

all: $(EXE)

$(EXE):
$(CC) $(CCFLAGS) $(OPTFLAGS) $(INCLUDE) main.cpp sopang.cpp -o $@
$(EXE): main.o sopang.o
$(CC) $(CCFLAGS) $(OPTFLAGS) $(INCLUDE) main.o sopang.o -o $@

main.o: main.cpp params.hpp helpers.hpp
$(CC) $(CCFLAGS) $(OPTFLAGS) $(INCLUDE) -c main.cpp

sopang.o: sopang.cpp sopang.hpp
$(CC) $(CCFLAGS) $(OPTFLAGS) $(INCLUDE) -c sopang.cpp

.PHONY: clean

clean:
rm -f $(EXE)
rm -f main.o sopang.o $(EXE)

rebuild: clean all

0 comments on commit 1b94de2

Please sign in to comment.