Created
November 17, 2020 00:00
-
-
Save wooosh/a6db06fbe6d15fb972bf0d35c33ad940 to your computer and use it in GitHub Desktop.
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
SRC=*.c | |
OBJ=$(SRC:.c=.o) | |
DEP=$(OBJ:.o=.d) | |
TARGET=myprogram | |
.PHONY: all clean | |
all: $(TARGET) | |
$(TARGET): $(OBJ) | |
$(LD) -o $(TARGET) $(OBJ) | |
-include $(DEP) | |
%.o: %.c | |
$(CC) $(CFLAGS) -MMD -MP -o $@ -c $< | |
clean: | |
$(RM) $(OBJ) | |
$(RM) $(TARGET) | |
$(RM) $(DEP) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment