28 lines
555 B
Makefile
28 lines
555 B
Makefile
TARGET = gtdc
|
|
|
|
CFLAGS = -Wall -O2 -MD -MP -MF $(*F).d
|
|
LDFLAGS = $(shell pkg-config --libs gtk+-2.0 gtkdatabox)
|
|
CFLAGS += $(shell pkg-config --cflags gtk+-2.0 gtkdatabox)
|
|
|
|
# ------
|
|
|
|
SRC := $(wildcard *.c)
|
|
|
|
all: $(TARGET)
|
|
|
|
$(TARGET): $(SRC:.c=.o)
|
|
@echo " Linking file: $@"
|
|
@$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) > /dev/null
|
|
|
|
%.o: %.c
|
|
@echo " Building file: $<"
|
|
@$(CC) -c $(CFLAGS) $< -o $@
|
|
|
|
clean:
|
|
rm -rf $(TARGET) *.o *.d
|
|
|
|
socat:
|
|
socat tcp4-listen:5000,fork,reuseaddr /dev/ttyACM0,raw,echo=0,flock-ex-nb
|
|
|
|
-include $(shell find -name *.d 2> /dev/null)
|