ewol/external/date/lutin_date.py

37 lines
808 B
Python
Raw Normal View History

#!/usr/bin/python
2013-12-23 22:38:46 +01:00
import lutinModule as module
import lutinTools as tools
import datetime
2013-12-23 22:38:46 +01:00
def get_desc():
return "Date buid date of the program"
def create(target):
# module name is 'edn' and type binary.
2013-12-23 22:38:46 +01:00
myModule = module.Module(__file__, 'date', 'LIBRARY')
# add the file to compile:
2013-12-23 22:38:46 +01:00
myModule.add_src_file([
'date/date.cpp'])
now = datetime.datetime.now()
2013-12-23 22:38:46 +01:00
myModule.compile_flags_CC([
'-Wno-write-strings',
'-Wall',
"-DBUILD_DAY=\""+str(now.day)+"\"",
"-DBUILD_MONTH=\""+str(now.month)+"\"",
"-DBUILD_YEAR=\""+str(now.year)+"\"",
"-DBUILD_HOUR=\""+str(now.hour)+"\"",
"-DBUILD_MINUTE=\""+str(now.minute)+"\"",
"-DBUILD_SECOND=\""+str(now.second)+"\""])
2013-12-23 22:38:46 +01:00
myModule.add_export_path(tools.get_current_path(__file__))
# add the currrent module at the
return myModule