-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.win
50 lines (45 loc) · 1.42 KB
/
Makefile.win
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
VFLAGS=-X -I.\
-X -I/mingw64/include\
-X -I/mingw64/include/gee-0.8\
-X -I/mingw64/include/json-glib-1.0\
-X -L/mingw64/lib\
-X -DGETTEXT_PACKAGE\
-X -D__LCC__
PKG = --pkg gmodule-2.0\
--pkg sqlite3\
--pkg mysql\
--pkg gee-0.8\
--pkg gio-2.0\
--pkg posix\
--pkg libxml-2.0\
--pkg json-glib-1.0
VLIBS= `pkg-config --libs gio-2.0`\
-lgmodule-2.0\
-ljson-glib-1.0\
-lxml2\
-lgee-0.8\
-lsqlite3\
-lmysqlclient\
-lintl
VC=valac
SOURCES=$(wildcard classes/*.vala) $(wildcard Database/*.vala)
OBJ=$(wildcard *.o)
DEST_LIBRARY=libSinticBolivia.dll
LIBRARY_NAME=SinticBolivia
#include Database/Makefile
OBJ=$(wildcard *.o)
all: $(SOURCES) $(DEST_LIBRARY)
$(DEST_LIBRARY): $(SOURCES)
@#windres --input-format=rc --output-format=res sinticbolivia-copia.rc sinticbolivia.o
windres sinticbolivia.rc sinticbolivia.o
@#$(VC) -D __WIN32__ $(VFLAGS) $(VLIBS) --library=$(LIBRARY_NAME) -H $(LIBRARY_NAME).h $(SOURCES) -X -fPIC -X -shared sinticbolivia.o -o bin/$@
$(VC) -c -D __WIN32__ $(VFLAGS) $(PKG) --library=$(LIBRARY_NAME) -H $(LIBRARY_NAME).h $(SOURCES) -X -fPIC
gcc -c ccode/cpuid.c -fPIC
gcc -o $@ *.o $(VLIBS) -shared -Wl,--kill-at
@rm *.o
test: test.vala
$(VC) -c test.vala -X -I. $(VFLAGS) $(PKG) $(LIBRARY_NAME).vapi
gcc -o bin/test.exe test.vala.o -L./bin -Ld:/gtk+-3.0/lib -l$(LIBRARY_NAME) -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
@rm test.vala.o
clean:
rm -fv bin/$(DEST_LIBRARY) *.h *.c *.o