FLAGS = -Wall -Wextra -O0 -g3 -I.

ifeq ($(OS),Windows_NT)
    EXT = .exe
	FLAGS += -lws2_32 -lbcrypt
else
	EXT = .out
endif

all: cweb.c cweb.h cozisnews$(EXT)

cweb.c cweb.h: src/main.c src/main.h
	python amalg.py

cozisnews$(EXT): demo/main.c cweb.c cweb.h
	gcc -o $@ demo/main.c cweb.c $(FLAGS)

clean:
	rm *.o *.out *.exe
