Last active
October 17, 2018 16:23
-
-
Save isaac-weisberg/fbe6f9b945f80325bd3f02ac486b4835 to your computer and use it in GitHub Desktop.
Most orthodox starter Makefile for C-based projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC=clang | |
LD=ld | |
LDFLAGS=-lc | |
CCFLAGS= | |
EXEC=bin/a.out | |
OBJECTS=src/main.o \ | |
default: run | |
%.o: %.c | |
$(CC) -c $< -o $@ $(CCFLAGS) | |
$(EXEC): $(OBJECTS) | |
$(LD) $(OBJECTS) -o $(EXEC) $(LDFLAGS) | |
run: $(EXEC) | |
$(EXEC) | |
clean: | |
-rm -rf $(EXEC) $(OBJECTS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Свистит от души