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 # ignore binaries
*.exe *.exe
*.o
# ignore object dumps # ignore object dumps
*.dump *.dump

View File

@ -1,11 +1,11 @@
CPP=g++ 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) all: $(EXEC)
%.exe: %.cpp %.o: %.cpp
g++ $< -o $@ g++ $< -o $@ -c
clean: clean:
$(RM) $(EXEC) $(RM) $(EXEC)