Makefile 11.2 KB
Newer Older
Xavier de Blas's avatar
Xavier de Blas committed
1
# **************************************************************************
2
# Makefile.
Xavier de Blas's avatar
Xavier de Blas committed
3
# --------------------------------------------------------------------------
4
# Licencia GPL. Juan Gonzalez Gomez, Xavier de Blas Foix
Xavier de Blas's avatar
Xavier de Blas committed
5 6 7 8 9
# --------------------------------------------------------------------------
#
#***************************************************************************


10
#---- C Compilator
Xavier de Blas's avatar
Xavier de Blas committed
11 12 13
CC = gcc
CFLAGS = -Wall

14
#-- C# Compilator
Xavier de Blas's avatar
Xavier de Blas committed
15
MCS = gmcs
Xavier de Blas's avatar
Xavier de Blas committed
16

17 18 19 20 21 22 23
BUILD_DIR = build/data

#-- WSDL Client Compilator
WSDL = chronojump_server/compile_wsdl.sh

#-------- Names of programs to build

Xavier de Blas's avatar
Xavier de Blas committed
24 25 26

CHRONOJUMP = chronojump

27
CHRONOJUMP_MINI = chronojump_mini
28
#CHRONOJUMP_MINI_VALIDATE = chronojump_mini_validate
29 30 31 32 33 34 35

CHRONOJUMP_SERVER = chronojump_server


#--------Dependences of CHRONOJUMP


Xavier de Blas's avatar
Xavier de Blas committed
36
CHRONOJUMP_DEP_GUI = src/gui/chronojump.cs src/gui/confirm.cs src/gui/error.cs src/gui/eventExecute.cs src/gui/eventGraphConfigure.cs src/gui/event.cs src/gui/jump.cs src/gui/jumpType.cs src/gui/run.cs src/gui/runType.cs src/gui/reactionTime.cs src/gui/pulse.cs src/gui/person.cs src/gui/preferences.cs src/gui/session.cs src/gui/stats.cs src/gui/report.cs src/gui/about.cs src/gui/helpPorts.cs src/gui/dialogMessage.cs src/gui/dialogCalendar.cs src/gui/dialogImageTest.cs src/gui/language.cs src/gui/repetitiveConditions.cs src/gui/chronopicConnection.cs src/gui/convertWeight.cs src/gui/genericWindow.cs src/gui/splash.cs src/gui/server.cs src/gui/dialogServerStats.cs src/gui/evaluator.cs
37

38
CHRONOJUMP_DEP_STATS = src/statType.cs src/stats/main.cs src/stats/global.cs src/stats/sjCmjAbk.cs src/stats/sjCmjAbkPlus.cs src/stats/djIndex.cs src/stats/djQ.cs src/stats/rjIndex.cs src/stats/rjPotencyBosco.cs src/stats/rjEvolution.cs src/stats/ieIub.cs src/stats/fv.cs src/stats/potency.cs src/stats/rjAVGSD.cs
39

40
CHRONOJUMP_DEP_GRAPHS = src/stats/graphs/graphData.cs src/stats/graphs/graphSerie.cs src/stats/graphs/global.cs src/stats/graphs/sjCmjAbk.cs src/stats/graphs/sjCmjAbkPlus.cs src/stats/graphs/djIndex.cs src/stats/graphs/djQ.cs src/stats/graphs/rjIndex.cs src/stats/graphs/rjPotencyBosco.cs src/stats/graphs/rjEvolution.cs src/stats/graphs/ieIub.cs src/stats/graphs/fv.cs src/stats/graphs/potency.cs src/stats/graphs/rjAVGSD.cs
41

42
CHRONOJUMP_DEP_SQLITE = src/sqlite/main.cs src/sqlite/preferences.cs src/sqlite/person.cs src/sqlite/session.cs src/sqlite/jump.cs src/sqlite/jumpRj.cs src/sqlite/jumpType.cs src/sqlite/run.cs src/sqlite/runInterval.cs src/sqlite/runType.cs src/sqlite/personSession.cs src/sqlite/stat.cs src/sqlite/pulse.cs src/sqlite/pulseType.cs src/sqlite/reactionTime.cs src/sqlite/multiChronopic.cs src/sqlite/event.cs src/sqlite/sport.cs src/sqlite/speciallity.cs src/sqlite/country.cs src/sqlite/server.cs
43

44
CHRONOJUMP_DEP_EXECUTE = src/execute/event.cs src/execute/jump.cs src/execute/run.cs src/execute/pulse.cs src/execute/reactionTime.cs src/execute/multiChronopic.cs
45

46 47
CHRONOJUMP_DEP_SERVER = chronojump_server/ChronojumpServer.cs

48
CHRONOJUMP_DEP = src/chronojump.cs src/person.cs src/event.cs src/eventType.cs src/jump.cs src/jumpType.cs src/run.cs src/runType.cs src/pulse.cs src/pulseType.cs src/reactionTime.cs src/reactionTimeType.cs src/multiChronopic.cs src/session.cs src/exportSession.cs src/treeViewEvent.cs src/treeViewPerson.cs src/treeViewJump.cs src/treeViewRun.cs src/treeViewPulse.cs src/treeViewReactionTime.cs src/treeViewMultiChronopic.cs src/util.cs src/utilGtk.cs src/constants.cs src/report.cs src/updateProgressBar.cs src/prepareEventGraphObjects.cs src/sport.cs src/log.cs src/serverPing.cs src/serverEvaluator.cs src/server.cs $(CHRONOJUMP_DEP_GUI) $(CHRONOJUMP_DEP_STATS) $(CHRONOJUMP_DEP_GRAPHS) $(CHRONOJUMP_DEP_SQLITE) $(CHRONOJUMP_DEP_REPORT) $(CHRONOJUMP_DEP_EXECUTE) $(CHRONOJUMP_DEP_SERVER)
49

50
RESOURCES_GLADE = -resource:glade/chronojump.glade,chronojump.glade
51

52 53 54 55 56 57
RESOURCES_IMAGES = -resource:images/mini/no_image.png,mini/no_image.png \
		-resource:images/agility_505.png,agility_505.png 		-resource:images/mini/agility_505.png,mini/agility_505.png \
		-resource:images/agility_20yard.png,agility_20yard.png		-resource:images/mini/agility_20yard.png,mini/agility_20yard.png \
		-resource:images/agility_illinois.png,agility_illinois.png 	-resource:images/mini/agility_illinois.png,mini/agility_illinois.png \
		-resource:images/agility_shuttle.png,agility_shuttle.png 	-resource:images/mini/agility_shuttle.png,mini/agility_shuttle.png \
		-resource:images/agility_zigzag.png,agility_zigzag.png 		-resource:images/mini/agility_zigzag.png,mini/agility_zigzag.png \
58
		-resource:images/jump_free.png,jump_free.png 			-resource:images/mini/jump_free.png,mini/jump_free.png \
59
		-resource:images/jump_sj.png,jump_sj.png 			-resource:images/mini/jump_sj.png,mini/jump_sj.png \
60
		-resource:images/jump_sj_l.png,jump_sj_l.png 			-resource:images/mini/jump_sj_l.png,mini/jump_sj_l.png \
61
		-resource:images/jump_cmj.png,jump_cmj.png 			-resource:images/mini/jump_cmj.png,mini/jump_cmj.png \
62
		-resource:images/jump_cmj_l.png,jump_cmj_l.png 			-resource:images/mini/jump_cmj_l.png,mini/jump_cmj_l.png \
63
		-resource:images/jump_abk.png,jump_abk.png 			-resource:images/mini/jump_abk.png,mini/jump_abk.png \
64
		-resource:images/jump_abk_l.png,jump_abk_l.png 			-resource:images/mini/jump_abk_l.png,mini/jump_abk_l.png \
65 66
		-resource:images/jump_dj.png,jump_dj.png 			-resource:images/mini/jump_dj.png,mini/jump_dj.png \
		-resource:images/jump_rocket.png,jump_rocket.png 		-resource:images/mini/jump_rocket.png,mini/jump_rocket.png \
67 68
		-resource:images/jump_rj.png,jump_rj.png 			-resource:images/mini/jump_rj.png,mini/jump_rj.png \
		-resource:images/jump_rj_in.png,jump_rj_in.png 			-resource:images/mini/jump_rj_in.png,mini/jump_rj_in.png \
69
		-resource:images/jump_rj_hexagon.png,jump_rj_hexagon.png 	-resource:images/mini/jump_rj_hexagon.png,mini/jump_rj_hexagon.png \
70 71
		-resource:images/run_simple.png,run_simple.png 			-resource:images/mini/run_simple.png,mini/run_simple.png \
		-resource:images/run_interval.png,run_interval.png 		-resource:images/mini/run_interval.png,mini/run_interval.png \
72
		-resource:images/margaria.png,margaria.png			-resource:images/mini/margaria.png,mini/margaria.png \
73 74
		-resource:images/pulse_free.png,pulse_free.png 			-resource:images/mini/pulse_free.png,mini/pulse_free.png \
		-resource:images/pulse_custom.png,pulse_custom.png		-resource:images/mini/pulse_custom.png,mini/pulse_custom.png \
75
		-resource:images/mtgug.png,mtgug.png				-resource:images/mini/mtgug.png,mini/mtgug.png \
76
		-resource:images/take_off.png,take_off.png			-resource:images/mini/take_off.png,mini/take_off.png \
Xavier de Blas's avatar
Xavier de Blas committed
77 78 79
		-resource:images/chronopic1.jpg,chronopic1.jpg			-resource:images/mini/chronopic1.jpg,mini/chronopic1.jpg \
		-resource:images/chronopic2.jpg,chronopic2.jpg			-resource:images/mini/chronopic2.jpg,mini/chronopic2.jpg \
		-resource:images/chronopic3.jpg,chronopic3.jpg			-resource:images/mini/chronopic3.jpg,mini/chronopic3.jpg \
80 81 82
		-resource:images/modular_platform_with_chronopic.jpg,modular_platform_with_chronopic.jpg			-resource:images/mini/modular_platform_with_chronopic.jpg,mini/modular_platform_with_chronopic.jpg \
		-resource:images/plataforma_contactos.jpg,plataforma_contactos.jpg			-resource:images/mini/plataforma_contactos.jpg,mini/plataforma_contactos.jpg \
		-resource:images/infrared.png,infrared.png			-resource:images/mini/infrared.png,mini/infrared.png \
Xavier de Blas's avatar
Xavier de Blas committed
83 84 85 86 87 88 89 90 91
		-resource:images/stock_bell.png,stock_bell.png \
		-resource:images/stock_bell_green.png,stock_bell_green.png \
		-resource:images/stock_bell_red.png,stock_bell_red.png \
		-resource:images/audio-volume-high.png,audio-volume-high.png \
		-resource:images/audio-volume-muted.png,audio-volume-muted.png \
		-resource:images/gpm-statistics.png,gpm-statistics.png \
		-resource:images/stock_task-assigned.png,stock_task-assigned.png \
		-resource:images/preferences-system.png,preferences-system.png \
		-resource:images/stock_delete.png,stock_delete.png \
92
		-resource:images/chronojump_icon.png,chronojump_icon.png \
93
		-resource:images/chronojump_icon_graph.png,chronojump_icon_graph.png \
94 95 96
		-resource:images/gtk-zoom-fit.png,gtk-zoom-fit.png \
		-resource:images/gtk-zoom-in.png,gtk-zoom-in.png \
		-resource:images/gtk-zoom-in-with-text.png,gtk-zoom-in-with-text.png \
97
		-resource:images/chronojump_320.png,chronojump_320.png \
98 99
		
#-resource:images/gtk-zoom-out.png,gtk-zoom-out.png \
100

101 102
#logo is included as assemblie and as a file (with create_release.sh and installjammer)
#report_web_style.css only as a file (there were problems when copying into file at report with stream)
103
RESOURCES_REPORT = -resource:images/chronojump_logo.png,chronojump_logo.png \
104
		#-resource:images/report_web_style.css,report_web_style.css \
105 106


107
CHRONOJUMP_LIB =  -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 -r:System.Data -r:Mono.Data.Sqlite -r:System.Web.Services
108

109 110
NPLOT_LIBS = build/data/linux_dlls

111
#--------Dependences of CHRONOJUMP_MINI
112

113
CHRONOJUMP_MINI_DEP = src/chronojump_mini.cs src/chronopic.cs src/util.cs src/log.cs src/constants.cs 
114
#CHRONOJUMP_MINI_VALIDATE_DEP = src/chronojump_mini_validate.cs src/chronopic.cs src/util.cs src/constants.cs 
115

116 117
#--------Dependences of CHRONOJUMP_SERVER

118
CHRONOJUMP_SERVER_DEP = chronojump_server/chronojumpServerCSharp.cs src/sqlite/*.cs src/util.cs src/person.cs src/event.cs src/jump.cs src/run.cs src/pulse.cs src/reactionTime.cs src/session.cs src/eventType.cs src/jumpType.cs src/runType.cs src/pulseType.cs src/sport.cs src/constants.cs src/log.cs src/serverPing.cs src/serverEvaluator.cs chronojump_server/BCrypt.cs 
119 120 121 122 123


#--------Makefiles

#chronojump and chronojump_mini (default if used 'make')
124
all: $(CHRONOJUMP).prg $(CHRONOJUMP_MINI).prg
125
server: $(CHRONOJUMP_SERVER)
126
#all: $(CHRONOJUMP).prg $(CHRONOJUMP_MINI).prg $(CHRONOJUMP_MINI_VALIDATE).prg
Xavier de Blas's avatar
Xavier de Blas committed
127

128 129
#chronojump_server: use 'make server'
server: $(CHRONOJUMP_SERVER).dll
130

Xavier de Blas's avatar
Xavier de Blas committed
131 132

#-------------------------------
133
# Compile CHRONOJUMP (C#)
Xavier de Blas's avatar
Xavier de Blas committed
134 135
#-------------------------------

136
$(CHRONOJUMP).prg: $(NPLOT_LIBS)/NPlot.dll $(NPLOT_LIBS)/NPlot.Gtk.dll $(CHRONOJUMP_DEP) src/chronopic.cs glade/chronojump.glade
Xavier de Blas's avatar
Xavier de Blas committed
137
	cp version.txt $(BUILD_DIR)
138
	./compile_po_files.sh #update translations
139
	$(MCS) -debug $(CHRONOJUMP_DEP) $(RESOURCES_GLADE) $(RESOURCES_IMAGES) $(RESOURCES_REPORT) -unsafe src/chronopic.cs -r:$(NPLOT_LIBS)/NPlot.dll -r:$(NPLOT_LIBS)/NPlot.Gtk.dll -r:System.Drawing -r:Mono.Posix $(CHRONOJUMP_LIB) -nowarn:169 -out:$(BUILD_DIR)/$(CHRONOJUMP).prg 
Xavier de Blas's avatar
Xavier de Blas committed
140 141
   
    
142
#------------------------------------
143
# Compile CHRONOJUMP_MINI (C#)
144 145
#------------------------------------

146
$(CHRONOJUMP_MINI).prg: $(CHRONOJUMP_MINI_DEP)
147
	 $(MCS) $(CHRONOJUMP_MINI_DEP) -r:Mono.Posix -out:$(BUILD_DIR)/$(CHRONOJUMP_MINI).prg 
148

149 150
#$(CHRONOJUMP_MINI_VALIDATE).prg: $(CHRONOJUMP_MINI_VALIDATE_DEP)
#	 $(MCS) $(CHRONOJUMP_MINI_VALIDATE_DEP) -r:Mono.Posix -out:$(BUILD_DIR)/$(CHRONOJUMP_MINI_VALIDATE).prg 
151 152 153 154 155 156
   

#------------------------------------
# Compile server webservice & WSDL
#------------------------------------

157
$(CHRONOJUMP_SERVER).dll: $(CHRONOJUMP_SERVER_DEP) chronojump_server/chronojumpServer.asmx
158
	$(MCS) -t:library -out:chronojump_server/bin/chronojumpServer.dll -r:System.Data -r:Mono.Data.Sqlite -r:System.Web.Services -r:Mono.Posix $(CHRONOJUMP_SERVER_DEP)
159
#currently deactivated WSDL compilation: (seems it doesn't work because when there's no network, there's no localhost) (not, it doesn't work by other reasons)
160
#$(WSDL)
161 162


Xavier de Blas's avatar
Xavier de Blas committed
163
#--------------------------
164
#  GENERIC rules
Xavier de Blas's avatar
Xavier de Blas committed
165 166 167
#--------------------------
.c.o:		
		$(CC) $(CFLAGS) -c $<
168 169

clean::
170
	  rm -f $(BUILD_DIR)/$(CHRONOJUMP).prg $(BUILD_DIR)/$(CHRONOJUMP_MINI).prg