Hello App: Makefile
Contents
Makefile
# Hello
#
# Makefile to build the MAE Hello app
#
# Note that the genmae program generates msgHello.cpp from hello.mreg
# Note that the genformcode program generates helloPrompt.html from helloPrompt.ui
# Note that no API files (.cpp, .h) are generated by genmae because no API is defined in hello.mreg
CC = gcc
MAEDIR = $(shell -d /opt/mae && echo /opt/mae || echo /usr/mae)
CPPFLAGS = -g -I../utillib -I../libdb -I../lib -I../maeapi
LIBS = ../lib/libmae.a
CPPLIB = -lstdc++ -lm
HELLO = ../../bin/hello
HELLO_SRCS = hello.cpp \
msgHello.cpp \
mgmtHello.cpp \
HelloApp.cpp \
cache.cpp
HELLO_OBJS=$(HELLO_SRCS:%.cpp=%.o)
# Note that the Hello app does not presently define an API, so no need to build it
#API=HelloAPI.h HelloAPI.cpp HelloAPI.py
#APIOBJ=HelloAPI.o
UI_SRCS=helloPrompt.ui
UI_HTMLS=$(UI_SRCS:hello%.ui=../../html/record/hello%.html)
PY_PARTS = msgHello.py
GENMAE = ../../bin/genmae
GENFORMCODE= ../../bin/genformcode
TARGETS = $(APIOBJ) $(UI_HTMLS) $(HELLO) $(PY_PARTS)
.SUFFIXES: .ui .html
../../html/record/hello%.html: hello%.ui
$(GENFORMCODE) html "$<" "$@"
all: $(API) $(TARGETS)
install: $(TARGETS)
cp -p $(HELLO) $(MAEDIR)/bin/
cp -p *.py $(MAEDIR)/bin/
cp -p *.mreg $(MAEDIR)/maeapi/
sed < mgmttaskdb.csv > $(MAEDIR)/conf/tasks.mae/mgmttaskdb_hello.csv 's#/usr/mae#$(MAEDIR)#g'
#sed < mgmttaskdbpy.csv > $(MAEDIR)/conf/tasks.mae/mgmttaskdb_hello.csv 's#/usr/mae#$(MAEDIR)#g'
for i in cache.cpp HelloApp.cpp HelloApp.h hello.cpp hello.h hello.mreg helloPrompt.ui Makefile mgmtHello.cpp mgmttaskdb.csv msgHello.cpp hellopy.mreg HelloApp.py HelloCache.py hello.py mgmtHello.py msgHello.py mgmttaskdbpy.csv; do code2wiki -o /usr/mae/html/doc/Hello_App$$i.wiki -title "Hello App: $$i" -parent "Sample App" $$i; done
code2wiki -o /usr/mae/html/doc/Hello_Apphello.html.wiki -title "Hello App: hello.html" -parent "Sample App" ../../html/doc/hello.html
maesrc:
mkdir -p $(MAEDIR)/src/hello
cp -p Makefile *.cpp *.h *.ui *.mreg $(MAEDIR)/src/hello/
$(HELLO) : $(HELLO_OBJS) $(LIBS)
$(CC) -o$(HELLO) $(HELLO_OBJS) $(LIBS) $(CPPLIB)
msgHello.cpp: hello.mreg HelloApp.cpp helloPrompt.ui
$(GENMAE) hello.mreg -msg $@
msgHello.py: hellopy.mreg HelloApp.py helloPrompt.ui
$(GENMAE) hellopy.mreg -msgpy $@
#$(API): hello.mreg
# $(GENMAE) $< -apicpp -apih -apipy
clean:
rm -f *.o $(HELLO)
deps:
genmakedeps *.cpp
bak:
cp -p Makefile *.h *.cpp BAK/
### Contents Below This Line Auto-Generated by genmakedeps ###
HelloApp.o: ../lib/User.h ../libdb/Datastore.h ../utillib/IntList.h ../utillib/StringSet.h ../utillib/StrExt.h ../utillib/StringList.h ../utillib/XMLData.h ../utillib/HashArray.h ../utillib/Datemath.h hello.h ../utillib/UserDevice.h ../utillib/Image.h ../utillib/Point.h ../utillib/ImageLib.h ../utillib/RawData.h ../lib/Cache.h ../utillib/debug.h ../utillib/MgmtClient.h HelloApp.h
cache.o: hello.h ../utillib/UserDevice.h ../utillib/XMLData.h ../utillib/HashArray.h ../utillib/StringSet.h ../utillib/Image.h ../utillib/StrExt.h ../utillib/Point.h ../utillib/ImageLib.h ../libdb/Datastore.h ../utillib/IntList.h ../utillib/StringList.h ../utillib/RawData.h ../lib/Cache.h ../utillib/debug.h ../utillib/MgmtClient.h HelloApp.h ../utillib/MAE.h ../utillib/MAETask.h ../utillib/maedefs.h ../utillib/MAEConn.h ../utillib/Socket.h ../utillib/Timer.h ../utillib/Stopwatch.h ../utillib/LogRotate.h ../utillib/MsgBroadcast.h ../utillib/Messenger.h ../utillib/RemoteService.h
hello.o: ../utillib/MAEApp.h ../utillib/MAE.h ../utillib/MAETask.h ../utillib/maedefs.h ../utillib/MAEConn.h ../utillib/Socket.h ../utillib/Timer.h ../utillib/HashArray.h ../utillib/Stopwatch.h ../utillib/LogRotate.h ../utillib/MsgBroadcast.h ../utillib/Messenger.h ../utillib/XMLData.h ../utillib/StringSet.h ../utillib/StrExt.h ../utillib/debug.h ../utillib/RemoteService.h ../utillib/UserDevice.h ../utillib/Image.h ../utillib/Point.h ../utillib/ImageLib.h ../libdb/Datastore.h ../utillib/IntList.h ../utillib/StringList.h ../utillib/RawData.h ../utillib/MgmtClient.h hello.h ../lib/Cache.h HelloApp.h
mgmtHello.o: ../utillib/MAE.h ../utillib/MAETask.h ../utillib/maedefs.h ../utillib/MAEConn.h ../utillib/Socket.h ../utillib/Timer.h ../utillib/HashArray.h ../utillib/Stopwatch.h ../utillib/LogRotate.h ../utillib/MsgBroadcast.h ../utillib/Messenger.h ../utillib/XMLData.h ../utillib/StringSet.h ../utillib/StrExt.h ../utillib/debug.h ../utillib/RemoteService.h ../utillib/UserDevice.h ../utillib/Image.h ../utillib/Point.h ../utillib/ImageLib.h ../libdb/Datastore.h ../utillib/IntList.h ../utillib/StringList.h ../utillib/RawData.h ../utillib/MgmtClient.h hello.h ../lib/Cache.h HelloApp.h
msgHello.o: ../utillib/MAE.h ../utillib/MAETask.h ../utillib/maedefs.h ../utillib/MAEConn.h ../utillib/Socket.h ../utillib/Timer.h ../utillib/HashArray.h ../utillib/Stopwatch.h ../utillib/LogRotate.h ../utillib/MsgBroadcast.h ../utillib/Messenger.h ../utillib/XMLData.h ../utillib/StringSet.h ../utillib/StrExt.h ../utillib/debug.h ../utillib/RemoteService.h ../utillib/UserDevice.h ../utillib/Image.h ../utillib/Point.h ../utillib/ImageLib.h ../libdb/Datastore.h ../utillib/IntList.h ../utillib/StringList.h ../utillib/RawData.h ../utillib/MgmtClient.h ../maeapi/DisplayAPI.h ../lib/UserProperty.h hello.h ../lib/Cache.h HelloApp.h