Created
April 28, 2022 16:17
-
-
Save mitbailey/748a1f0fb6ef7b9f3ba1fd45f3aed805 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
CC = gcc | |
COBJS = src/main.o src/example.o drivers/driver.o | |
EDCFLAGS = -I ./ -I ./include/ -Wall -pthread $(CFLAGS) | |
EDLDFLAGS := -lpthread -lm $(LDFLAGS) | |
TARGET = example.out | |
all: $(COBJS) | |
$(CC) $(EDCFLAGS) $(COBJS) -o $(TARGET) $(EDLDFLAGS) | |
sudo ./$(TARGET) | |
%.o: %.c | |
$(CC) $(EDCFLAGS) -o $@ -c $< | |
.PHONY: clean | |
clean: | |
$(RM) *.out | |
$(RM) *.o | |
$(RM) src/*.o | |
.PHONY: spotless | |
spotless: | |
$(RM) drivers/*.o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment