-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (52 loc) · 1.54 KB
/
Makefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.PHONY: all clean init imgscale ftpImager
# ---------- TCL stuff -------------
# Path to Tcl *.lib files
tcl_libd = "C:/mylib/ActiveTcl/lib"
# Path to Tcl *.h files
tcl_incd = "C:/mylib/ActiveTcl/include"
# Tcl library
tcl_lib = "tcl85"
# Tk library
tk_lib = "tk85"
# ------------ Needed only if a standalone release is needed ---------------
# Note: in this case a ./lib directory will be created
# If set to "yes" then all Tcl/Tk will be copies to ./bin
copy_tcl_binaries = "yes"
# Tcl binaries directory
tcl_bind = "C:/mylib/ActiveTcl/bin"
all: imgscale ftpImager
cp *.tcl ./bin
cp -r images ./bin/images
cp -r Img ./bin/Img
ifeq ($(copy_tcl_binaries), "yes")
cp $(tcl_bind)/*.dll ./bin
cp -r $(tcl_libd)/* ./lib
rm ./lib/*.lib
rm ./lib/*.sh
rm -r -f ./lib/ppm
endif
echo "FtpImager project is built!"
init:
ifeq ($(wildcard ./obj),)
mkdir ./obj
endif
ifeq ($(wildcard ./bin),)
mkdir ./bin
endif
ifeq ($(wildcard ./lib),)
mkdir ./lib
endif
echo "Initialization completed!"
clean:
rm -f -r ./obj/*
rm -f -r ./bin/*
rm -f -r ./lib/*
imgscale:
gcc -c imgscale.c -o ./obj/imgscale.o -Wall -O2 -DBUILD_DLL -I$(tcl_incd)
gcc -shared ./obj/imgscale.o -o ./bin/imgscale.dll -L$(tcl_libd) -l$(tcl_lib) -l$(tk_lib)
echo "ImgScale library is compiled!"
ftpImager:
g++ -c main.cpp -o ./obj/ftpImager.o -Wall -O2 -I$(tcl_incd)
# -mwindows specifies a GUI application type that does not have a console window
g++ ./obj/ftpImager.o -o ./bin/ftpImager.exe -L$(tcl_libd) -l$(tcl_lib) -l$(tk_lib) -mwindows
echo "FtpImager program is compiled!"