1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- ### Environment constants
- ARCH := arm
- #CROSS_COMPILE := ../../buildroot-at91-2018.02-at91/output/host/bin/arm-linux-
- #CROSS_COMPILE := /home/logan/EmbeddedProject/RTU/buildroot/buildroot-at91-2018.02-at91/output/host/bin/arm-linux-
- OBJDIR = obj
- INCLUDES = $(wildcard inc/*.h)
- ### External constant definitions
- # must get library build option to know if mpsse must be linked or not
- ### Constant symbols
- #CC := $(CROSS_COMPILE)gcc
- #AR := $(CROSS_COMPILE)ar
- CC := $(CROSS_COMPILE)gcc
- AR := $(CROSS_COMPILE)ar
- RANLIB := $(CROSS_COMPILE)ranlib
- CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I.
- # List the library sub-modules that are used by the application
- ### Linking options
- LIBS := -lmosquitto -lsqlite3 -ljson-c -lrt -lpthread -lm
- ### General build targets
- all: get_device.cgi set_device.cgi add_device.cgi del_device.cgi get_system.cgi \
- get_user.cgi get_platform.cgi set_platform.cgi login.cgi logout.cgi
- clean:
- rm -f *.o
- rm -f get_device.cgi set_device.cgi add_device.cgi del_device.cgi get_system.cgi \
- get_user.cgi get_platform.cgi set_platform.cgi login.cgi logout.cgi
-
- ### Sub-modules compilation
- libcgic.a: cgic.o cgic.h
- rm -f libcgic.a
- $(AR) rc libcgic.a cgic.o
- $(RANLIB) libcgic.a
- %.o: %.c
- $(CC) $(CFLAGS) -c $< -o $@
- get_device.cgi:get_device.o common.o command.o
- $(CC) $^ -o $@ $(LIBS)
- set_device.cgi:set_device.o common.o command.o
- $(CC) $^ -o $@ $(LIBS)
- add_device.cgi:add_device.o common.o command.o
- $(CC) $^ -o $@ $(LIBS)
- del_device.cgi:del_device.o common.o command.o
- $(CC) $^ -o $@ $(LIBS)
- get_system.cgi:get_system.o common.o command.o
- $(CC) $^ -o $@ $(LIBS)
- get_user.cgi:get_user.o common.o command.o
- $(CC) $^ -o $@ $(LIBS)
- get_platform.cgi:get_platform.o common.o command.o
- $(CC) $^ -o $@ $(LIBS)
- set_platform.cgi:set_platform.o common.o command.o
- $(CC) $^ -o $@ $(LIBS)
- login.cgi:login.o common.o command.o
- $(CC) $^ -o $@ $(LIBS)
- logout.cgi:logout.o common.o command.o
- $(CC) $^ -o $@ $(LIBS)
- install:
- echo "install"
- cp -rf ../dist/index.html /var/www/
- cp -rf ../dist/static /var/www/
- cp -rf cookie /var/www/cgi-bin/
- cp *.cgi /var/www/cgi-bin/
- ### EOF
|