# Makefile for GNU make 3.81 or later

LIBS=-lgmp -lpthread
OS := $(shell uname)
ARCH := $(shell uname -m)

ifeq ($(CPPFLAGS),)
CPPFLAGS=-I.. 
else
CPPFLAGS+=-I..
endif

ifeq ($(CC),)
CC=cc
endif

ifeq ($(CFLAGS),)
CFLAGS=-O
endif

### Linux
# ifeq ($(OS),Linux)
# LIBS+=-lpthread
# endif

all: cli lite
cli:
	$(CC) -D_CLI $(CPPFLAGS) $(CFLAGS) systester-cli.c -o systester-cli $(LDFLAGS) $(LIBS)

lite:
	$(CC) -D_CLI -D_LITE $(CPPFLAGS) $(CFLAGS) systester-cli.c -o systester-lite $(LDFLAGS) $(LIBS)	
	
strip:
	strip systester-cli
	strip systester-lite
clean:
	rm -rf systester-cli systester-lite systester-cli.exe systester-lite.exe
	
