DEBUG=-Wall -g

CC = gcc
LIBS = -lncurses -lpanel -lstr
# FreeBSD
CFLAGS = -w -funsigned-char -DUSE_TERMIOS $(DEBUG)

SRCS=sio.c sct0.c sc.c scstr.c scatr.c scasc.c \
     sccards.c slog.c scint.c strutil.c \
     sc_cflex.c sc_dx.c sc_ck.c sc_gsm.c
OBJS=$(SRCS:.c=.o)
HDRS= comp128.h sio.h sct0.h platform.h options.h varadic.h slog.h sc.h scint.h \
	strutil.h

sio.o : sio.c sio.h
	$(CC) $(CFLAGS) -c sio.c -o sio.o

gsm-hack: $(OBJS) $(HDRS) sres.c gsm-hack.c sres.h
	g++ -funsigned-char -O3 -w -o gsm-hack gsm-hack.c sres.c -I. $(OBJS) $(LIBS)

clean:	$(OBJS)
	rm -f $(OBJS) 
