init commit

This commit is contained in:
2025-08-21 22:58:56 -04:00
parent a6de5f641f
commit 5245ae176a
7 changed files with 172 additions and 0 deletions

24
Makefile Normal file
View File

@ -0,0 +1,24 @@
CC=gcc
CFLAGS= -c -g -Wall
LDLIBS = $(shell pkg-config --libs --cflags libusb-1.0)
TARGET := receipt-printer
BUILD_DIR := ./build
SRC_DIRS := ./src
SRCS := $(shell find $(SRC_DIRS) -name '*.c')
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
$(BUILD_DIR)/$(TARGET): $(OBJS)
$(CC) $(OBJS) -o $@ $(LDLIBS)
$(BUILD_DIR)/%.c.o: %.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) -c $< -o $@
.PHONY: clean
clean:
rm -rf $(BUILD_DIR)