Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## The Makefile for the RPI flash led file named blink.c at this address https://pastebin.com/YjQNewfY
- ## MD Harrington London Kent 20-03-2024 UK
- CC = gcc
- CFLAGS = -Wall -Wextra -std=c99
- LIBS = -lwiringPi -lpthread -lbcm2835
- TARGET = blink
- SRC_DIR = source
- INC_DIR = include
- SRC_FILES = $(wildcard $(SRC_DIR)/*.c)
- OBJ_DIR = obj
- OBJ_FILES = $(patsubst $(SRC_DIR)/%.c, $(OBJ_DIR)/%.o, $(SRC_FILES))
- INC_FILES = $(wildcard $(INC_DIR)/*.h)
- $(TARGET): $(OBJ_FILES)
- $(CC) $(CFLAGS) -o $(TARGET) $(OBJ_FILES) $(LIBS)
- $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR)
- $(CC) $(CFLAGS) -c -o $@ $< -I$(INC_DIR)
- $(OBJ_DIR):
- mkdir -p $(OBJ_DIR)
- .PHONY: clean
- clean:
- rm -rf $(OBJ_DIR) $(TARGET)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement