2020-12-05 19:26:32 +08:00
|
|
|
PROG ?= example
|
|
|
|
ROOT ?= $(realpath $(CURDIR)/../..)
|
2021-08-08 00:22:47 +08:00
|
|
|
CWD ?= $(realpath $(CURDIR))
|
|
|
|
DOCKER ?= docker run --rm -it -e Tmp=. -e WINEDEBUG=-all -v $(ROOT):$(ROOT) -w $(CWD)
|
2020-12-05 19:26:32 +08:00
|
|
|
|
|
|
|
all: $(PROG)
|
2021-08-08 00:22:47 +08:00
|
|
|
$(RUN) ./$(PROG)
|
2020-12-05 19:26:32 +08:00
|
|
|
|
|
|
|
$(PROG):
|
|
|
|
$(CC) ../../mongoose.c -I../.. -pthread $(CFLAGS) -o $(PROG) main.c
|
|
|
|
|
2021-08-08 00:22:47 +08:00
|
|
|
$(PROG).exe:
|
|
|
|
$(DOCKER) mdashnet/vc98 wine cl ../../mongoose.c main.c -I../.. /MD ws2_32.lib /Fe$@
|
|
|
|
$(DOCKER) mdashnet/vc98 wine $@
|
2020-12-05 19:26:32 +08:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb log.txt
|