fork(2) download
  1. #
  2. #
  3. # Red Pitaya Api example Makefile
  4. #
  5. #
  6. # Versioning system
  7. VERSION ?= 0.00-0000
  8.  
  9. REVISION ?= devbuild
  10.  
  11. CROSS_COMPILE = arm-linux-gnueabi-
  12.  
  13. #Define header includes
  14. RP_PATH_INCLUDE = -I../../SDK/include/
  15. # -I../../api-mockup/rpbase/src/
  16.  
  17. #Define library includes
  18. RP_LIB_INCLUDE = -L ../../SDK/include -lm -lpthread -lrp
  19. # -L ../../api-mockup/rpbase -lm -lpthread -lrp
  20.  
  21. #Cross compiler definition
  22. CC = gcc
  23. #Flags
  24. CFLAGS = -g -std=gnu99 -Wall -Werror
  25. #Objects
  26. OBJECTS = blink_diode.o
  27. #Target file
  28. TARGET = api_test
  29.  
  30. $(TARGET): $(OBJECTS)
  31. $(CC) -o $@ $^ $(CFLAGS) $(RP_LIB_INCLUDE) -Wl,--rpath,/lib
  32.  
  33. %.o: %.c
  34. $(CC) -c $(CFLAGS) $(RP_PATH_INCLUDE) $< -o $@
  35.  
  36. #Build the executable
  37. all: $(TARGET)
  38.  
  39. clean:
  40. $(RM) $(TARGET) *.o ~*
  41.  
  42.  
  43. # -----Error----- I have no idea what was wrong.
  44. # ../../api-mockup/rpbase/librp.so: file not recognized: File format not recognized
  45. #
  46. #
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:4: error: invalid preprocessing directive #Red
 #  Red Pitaya Api example Makefile
    ^
prog.cpp:6:3: error: invalid preprocessing directive #Versioning
 # Versioning system
   ^
prog.cpp:13:2: error: invalid preprocessing directive #Define
 #Define header includes
  ^
prog.cpp:15:3: error: invalid preprocessing directive #-
 # -I../../api-mockup/rpbase/src/
   ^
prog.cpp:17:2: error: invalid preprocessing directive #Define
 #Define library includes
  ^
prog.cpp:19:3: error: invalid preprocessing directive #-
 # -L ../../api-mockup/rpbase -lm -lpthread -lrp
   ^
prog.cpp:21:2: error: invalid preprocessing directive #Cross
 #Cross compiler definition
  ^
prog.cpp:23:2: error: invalid preprocessing directive #Flags
 #Flags
  ^
prog.cpp:25:2: error: invalid preprocessing directive #Objects
 #Objects
  ^
prog.cpp:27:2: error: invalid preprocessing directive #Target
 #Target file
  ^
prog.cpp:31:19: error: stray '@' in program
         $(CC) -o $@ $^ $(CFLAGS) $(RP_LIB_INCLUDE) -Wl,--rpath,/lib
                   ^
prog.cpp:34:54: error: stray '@' in program
         $(CC) -c $(CFLAGS) $(RP_PATH_INCLUDE) $< -o $@
                                                      ^
prog.cpp:36:2: error: invalid preprocessing directive #Build
 #Build the executable
  ^
prog.cpp:43:4: error: invalid preprocessing directive #--
 #  -----Error----- I have no idea what was wrong. 
    ^
prog.cpp:44:4: error: invalid preprocessing directive #.
 #  ../../api-mockup/rpbase/librp.so: file not recognized: File format not recognized
    ^
prog.cpp:7:1: error: 'VERSION' does not name a type
 VERSION ?= 0.00-0000
 ^
stdout
Standard output is empty