Skip to content
Snippets Groups Projects
Commit 5d03a8da authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

make remove and clean a bit more logical, add comments

parent eda26fb6
No related branches found
No related tags found
No related merge requests found
...@@ -18,27 +18,25 @@ $(BINDIR)/$(TARGET): $(BINDIR) ...@@ -18,27 +18,25 @@ $(BINDIR)/$(TARGET): $(BINDIR)
$(BINDIR): $(BINDIR):
mkdir -p $(BINDIR) mkdir -p $(BINDIR)
# Make binary linking .o files and libraries
$(BINDIR)/$(TARGET): $(OBJECTS) $(BINDIR)/$(TARGET): $(OBJECTS)
@$(LINKER) $(OBJECTS) $(LFLAGS) -o $@ @$(LINKER) $(OBJECTS) $(LFLAGS) -o $@
@echo "Linking complete." @echo "Linking complete."
## Compile an object for a c file in SRCDIR # Compile an object for a c file in SRCDIR
$(OBJDIR)/%.o: $(SRCDIR)/%.c $(DEPS) $(OBJDIR)/%.o: $(SRCDIR)/%.c $(DEPS)
mkdir -p $(OBJDIR) mkdir -p $(OBJDIR)
@$(CC) $(CFLAGS) -c $< -o $@ @$(CC) $(CFLAGS) -c $< -o $@
@echo "Compiled "$<" successfully." @echo "Compiled "$<" successfully."
cryptops-api: # Remove intermediate files
echo "test"
echo $(DEPS)
.PHONY: clean .PHONY: clean
clean: clean:
@rm -f $(OBJECTS) @rm -rf $(OBJDIR)
@echo "Cleanup complete." @echo "Cleanup complete."
# Remove all compiled files
.PHONY: remove .PHONY: remove
remove: clean remove: clean
@rm -f $(BINDIR)/$(TARGET) @rm -rf $(BINDIR)
@echo "Executable removed." @echo "Executable removed."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment