#GNU COMPILER
CC = gcc
LD = gcc
RM = rm -f

CFLAGS += -std=c99

SOURCES = $(wildcard *.c)
OBJECTS = $(patsubst %.c, %.o, $(notdir $(SOURCES)))

TARGET = convert8bitsToU16bits

.PHONY: all clean

all: $(TARGET)
	@echo Done

$(TARGET): $(OBJECTS)
	@echo Linking...
	@$(LD) -o $@ $^ $(LDFLAGS) $(LIB)

main.o: main.c
	@echo Compiling $(notdir $<)...
	@$(CC) -o $@ -c $< $(CFLAGS)

clean:
	@echo Cleaning...
	@$(RM) $(OBJECTS) $(TARGET)
