-CPPFLAGS=-O0 -g
+CPPFLAGS=-O0 -g -Wall
all: iotcloud.fcgi
-iotcloud.fcgi: iotcloud.cpp
- g++ $(CPPFLAGS) -o iotcloud.fcgi iotcloud.cpp -lfcgi -lfcgi++
+iotcloud.fcgi: iotcloud.o iotquery.o
+ g++ $(CPPFLAGS) -o iotcloud.fcgi iotcloud.o iotquery.o -lfcgi -lfcgi++
+
+iotcloud.o: iotcloud.cpp iotquery.h
+ g++ $(CPPFLAGS) -c -o iotcloud.o iotcloud.cpp
+
+iotquery.o: iotquery.cpp iotquery.h
+ g++ $(CPPFLAGS) -c -o iotquery.o iotquery.cpp