
.SILENT:

#target=linux
#target=windows

ifeq ($(target),windows)

CC = /tmp/win32gcc/cross-tools/bin/i386-mingw32msvc-gcc
CFLAGS = -O3 -W -Wall
STRIP= /tmp/win32gcc/cross-tools/bin/i386-mingw32msvc-strip -s
EXE=.exe

else

CC = gcc
CFLAGS = -O3 -W -Wall
STRIP=strip -s
EXE=
target=linux

endif

.SUFFIXES: .c .o

.c.o:
	$(CC) $(DEFS) $(CFLAGS) -c $<

all: WabModcheap$(EXE)

WabModcheap$(EXE): main.o lptport-$(target).o cn302.o
	$(CC) $(LDFLAGS) -o $@ $^
	$(STRIP) $@
clean:
	rm -f *~ *.o
zap:
	rm -f *~ *.o WabModcheap$(EXE)
