-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.w32
34 lines (33 loc) · 925 Bytes
/
makefile.w32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
BIN := bin
ENV := env
PROGRAM := wut-tools.exe
SOURCES := src/HttpReq.cpp \
src/LoginReq.cpp \
src/ScoreTableReq.cpp \
src/TimeTableReq.cpp \
src/HtmlParser.cpp \
src/main.cpp
HTML := $(wildcard ./html/*.html) cookies.txt
OBJS := $(patsubst %.cpp,%.o,$(SOURCES))
CXX := g++
CFLAGS := -g -Wall
INCLUDE := -I ./lib/libcurl/mingw/include \
-I ./lib/libgumbo/mingw/include \
-I ./lib/libgq/mingw/include
LIB := -L./lib/libcurl/mingw/lib \
-L./lib/libgumbo/mingw/lib \
-L./lib/libgq/mingw/lib \
-lgumbo -lgq -Wl,-Bdynamic -lcurldll -lwldap32 -lws2_32
.PHONY: clean install
$(PROGRAM): $(OBJS)
$(CXX) -o $@ $^ $(LIB)
%.o: %.cpp
$(CXX) -o $@ -c $< $(CFLAGS) $(INCLUDE)
clean:
rm $(OBJS) $(PROGRAM) $(HTML) -f
rm -rf $(BIN)
install: $(PROGRAM)
cp $(PROGRAM) $(BIN)
cp -f $(ENV)/*.dll $(BIN)
rm $(PROGRAM)
# ln -s $(BIN)/$(PROGRAM) $(PROGRAM)