Use object files instead of entire binary.

Makes for less assembly code to look through.
This commit is contained in:
Nicolás A. Ortega Froysa 2022-06-15 14:06:43 +02:00
parent c2ec66c7d4
commit 3c588f9a7d
2 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
# ignore binaries
*.exe
*.o
# ignore object dumps
*.dump

View File

@ -1,11 +1,11 @@
CPP=g++
EXEC := 00-const-vars/const.exe 00-const-vars/no-const.exe 01-inline-functions/inline.exe 01-inline-functions/no-inline.exe
EXEC := 00-const-vars/const.o 00-const-vars/no-const.o 01-inline-functions/inline.o 01-inline-functions/no-inline.o
all: $(EXEC)
%.exe: %.cpp
g++ $< -o $@
%.o: %.cpp
g++ $< -o $@ -c
clean:
$(RM) $(EXEC)