CC = gcc
CFLAGS = -Wall -O2 -Werror -g
LDFLAGS = -ljpeg
TARGET = parser
SRC = main.c caff.c ciff.c
TEST_SRC = test.c
TEST_TARGET = parser_test

all: $(TARGET)

$(TARGET): $(SRC)
	$(CC) $(CFLAGS) $(SRC) -o $(TARGET) $(LDFLAGS)

clean:
	rm -f $(TARGET)

test:
	$(CC) $(CFLAGS) $(TEST_SRC) -o $(TEST_TARGET)