mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 16:14:16 +01:00 
			
		
		
		
	A rather involved upgrade for both files and directories, seek and related functions are now completely supported: - lfs_file_seek - lfs_file_tell - lfs_file_rewind - lfs_file_size - lfs_dir_seek - lfs_dir_tell - lfs_dir_rewind This change also highlighted the concern that lfs_off_t is unsigned, whereas off_t is traditionally signed. Unfortunately, lfs_off_t is already used intensively through the codebase, so in focusing on moving forward and avoiding getting bogged down by details, I'm going to keep it as is and use the signed type lfs_soff_t where necessary.
		
			
				
	
	
		
			57 lines
		
	
	
		
			774 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
		
			774 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| TARGET = lfs
 | |
| 
 | |
| CC = gcc
 | |
| AR = ar
 | |
| SIZE = size
 | |
| 
 | |
| SRC += $(wildcard *.c emubd/*.c)
 | |
| OBJ := $(SRC:.c=.o)
 | |
| DEP := $(SRC:.c=.d)
 | |
| ASM := $(SRC:.c=.s)
 | |
| 
 | |
| TEST := $(patsubst tests/%.sh,%,$(wildcard tests/test_*))
 | |
| 
 | |
| ifdef DEBUG
 | |
| CFLAGS += -O0 -g3
 | |
| else
 | |
| CFLAGS += -Os
 | |
| endif
 | |
| ifdef WORD
 | |
| CFLAGS += -m$(WORD)
 | |
| endif
 | |
| CFLAGS += -I.
 | |
| CFLAGS += -std=c99 -Wall -pedantic
 | |
| 
 | |
| 
 | |
| all: $(TARGET)
 | |
| 
 | |
| asm: $(ASM)
 | |
| 
 | |
| size: $(OBJ)
 | |
| 	$(SIZE) -t $^
 | |
| 
 | |
| .SUFFIXES:
 | |
| test: test_format test_dirs test_files test_seek test_alloc test_paths test_orphan
 | |
| test_%: tests/test_%.sh
 | |
| 	./$<
 | |
| 
 | |
| -include $(DEP)
 | |
| 
 | |
| $(TARGET): $(OBJ)
 | |
| 	$(CC) $(CFLAGS) $^ $(LFLAGS) -o $@
 | |
| 
 | |
| %.a: $(OBJ)
 | |
| 	$(AR) rcs $@ $^
 | |
| 
 | |
| %.o: %.c
 | |
| 	$(CC) -c -MMD $(CFLAGS) $< -o $@
 | |
| 
 | |
| %.s: %.c
 | |
| 	$(CC) -S $(CFLAGS) $< -o $@
 | |
| 
 | |
| clean:
 | |
| 	rm -f $(TARGET)
 | |
| 	rm -f $(OBJ)
 | |
| 	rm -f $(DEP)
 | |
| 	rm -f $(ASM)
 |