Skip to content

Commit 8c6f508

Browse files
committed
output binary location fix in makefile
1 parent fbd614c commit 8c6f508

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
# i dont know why is my computer full of these temp files
44
.fuse_hidden*
55

6-
# the binary
7-
sdl_universe
8-
SDL_Universe
6+
# sublime text things
97
*.sublime*
108

119
### C++ ###

makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ sdl2: run
5151
# RULES
5252
#
5353

54-
run: $(TARGET)
54+
run: $(OUTPUTDIR)/$(TARGET)
5555
@echo ""
5656
@echo "### RUNNING VERSION" $(SDLVERSION)
5757
@echo -n " "
58-
./$(TARGET)
58+
./$(OUTPUTDIR)/$(TARGET)
5959

6060
# linking rule
61-
$(TARGET): $(OBJS)
61+
$(OUTPUTDIR)/$(TARGET): $(OBJS)
6262
@echo ""
6363
@echo "### LINKING" $@ "WITH" $(SDLVERSION)
6464
@echo -n " "
65-
$(CC) $^ $(LFLAGS) -o $(TARGET)
65+
$(CC) $^ $(LFLAGS) -o $(OUTPUTDIR)/$(TARGET)
6666

6767
# compilation rule
6868
$(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT)
@@ -80,7 +80,7 @@ clean:
8080
@echo -n " "
8181
$(RM) -r $(BUILDDIR)/SU/*.o
8282
@echo -n " "
83-
$(RM) -r $(TARGET)
83+
$(RM) -r $(OUTPUTDIR)/$(TARGET)
8484

8585
# variable print for debug purposes
8686
debug-%:

0 commit comments

Comments
 (0)