A messenger application for Raspberry Pi Zerofor A.U.TH (Real time Embedded systems).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

58 lines
1.2 KiB

  1. #
  2. # RTES_final makefile
  3. #
  4. # Author: Christos Choutouridis AEM:8997
  5. # email: cchoutou@ece.auth.gr
  6. #
  7. #
  8. # select one of the following or edit for your environment
  9. #
  10. #CXX := /usr/local/arm/bin/arm-unknown-linux-gnueabi-gcc
  11. CXX := D:\SysGCC\raspberry\bin\arm-linux-gnueabihf-gcc.exe
  12. CXXFLAGS := -std=c11 -Wall -Wextra -Werror
  13. CXXFEXTR := -c -fmessage-length=0
  14. LDFLAGS := -lm -lpthread
  15. BUILD := ./bin
  16. OBJ_DIR := $(BUILD)/obj
  17. APP_DIR := $(BUILD)
  18. TARGET := rtes_final
  19. SRC := $(wildcard src/*.c)
  20. OBJECTS := $(SRC:%.c=$(OBJ_DIR)/%.o)
  21. $(OBJ_DIR)/%.o: %.c
  22. @mkdir -p $(@D)
  23. $(CXX) $(CXXFEXTR) $(CXXFLAGS) -o $@ -c $<
  24. $(APP_DIR)/$(TARGET): $(OBJECTS)
  25. @mkdir -p $(@D)
  26. $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(APP_DIR)/$(TARGET) $(OBJECTS)
  27. # === Rules ===
  28. rtes_final: build $(APP_DIR)/$(TARGET)
  29. build:
  30. @mkdir -p $(APP_DIR)
  31. @mkdir -p $(OBJ_DIR)
  32. debug: CXXFLAGS += -DDEBUG -g3
  33. debug: rtes_final
  34. release: CXXFLAGS += -O2
  35. release: rtes_final
  36. upload:
  37. scp $(BUILD)/$(TARGET) root@192.168.0.1:/root/
  38. clean:
  39. -@rm -rvf $(OBJ_DIR)/*
  40. -@rm -rvf $(APP_DIR)/*
  41. all: clean release upload
  42. .PHONY: rtes_final build debug release upload clean all