Skip to content

Commit

Permalink
Create obj folder if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
josemam committed Oct 8, 2016
1 parent b6837f2 commit fc04aeb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ ifdef SystemRoot
endif

CXXFLAGS = -O3 -m32 -static -s -Wall -Iinclude -flto -fexec-charset=$(CHARSET)
OBJ = obj/
SRC = src/
OBJ = obj
SRC = src

all: iv-pid_eng iv-pid_esp

$(OBJ)%.o: $(SRC)%.cpp
$(OBJ):
mkdir $@

$(OBJ)/%.o: $(SRC)/%.cpp $(OBJ)
$(CXX) $(CXXFLAGS) -c $< -o $@

iv-pid_%: $(OBJ)iv-pid.o $(OBJ)io.o $(OBJ)func.o $(OBJ)strings_%.o
iv-pid_%: $(OBJ)/iv-pid.o $(OBJ)/io.o $(OBJ)/func.o $(OBJ)/strings_%.o
$(CXX) $(CXXFLAGS) $^ -o $@

0 comments on commit fc04aeb

Please sign in to comment.