12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- ### Application-specific constants
- APP_NAME = apps
- ### 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-
- #CROSS_COMPILE := /home/logan/iot/EdgeGateway/a40_src/out/sun8iw11p1/linux/common/buildroot/host/opt/ext-toolchain/bin/arm-linux-gnueabi-
- 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 := gcc
- #AR := ar
- CFLAGS := -O2 -Wall -Wextra -Iinc -I.
- ##CFLAGS := -O2 -Wall -Wextra -I.
- # List the library sub-modules that are used by the application
- ### Linking options
- #LIBS := -lmosquitto -lcrypto -lsqlite3 -ljson-c -lrt -lpthread -lm
- #LIBS := -lmosquitto -lcrypto -lsqlite3 -ljson-c -lrt -lpthread -lm -Wl,-rpath=../../buildroot-at91-2018.02-at91/output/target/usr/lib
- LIBS := -lmosquitto -lsqlite3 -ljson-c -lrt -lpthread -lm
- ### General build targets
- all: $(APP_NAME)
- clean:
- rm -f *.o
- rm -f $(APP_NAME)
- ### Sub-modules compilation
- %.o: %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(APP_NAME):apps.o sql_api.o common.o
- $(CC) $^ -o $@ $(LIBS)
- #sql_api: command.o sql_api.o common.o
- # $(CC) $^ -o $@ $(LIBS)
- install:
- echo "install"
- ### EOF
|