Обновить sk1/Makefile
This commit is contained in:
		
							parent
							
								
									dbba54a974
								
							
						
					
					
						commit
						90efb1c3f3
					
				
							
								
								
									
										35
									
								
								sk1/Makefile
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								sk1/Makefile
									
									
									
									
									
								
							| @ -1,33 +1,16 @@ | |||||||
| # Compiler and flags
 |  | ||||||
| CC = gcc | CC = gcc | ||||||
| CFLAGS = -Wall -Wextra -std=c11 | CFLAGS = -Wall -Wextra -std=c99 | ||||||
| 
 | 
 | ||||||
| # Targets
 | all: compressor | ||||||
| TARGET = compressor |  | ||||||
| 
 | 
 | ||||||
| # Source files
 | compressor: main.o compressor.o | ||||||
| SRCS = main.c compressor.c |   $(CC) $(CFLAGS) -o compressor main.o compressor.o | ||||||
| 
 | 
 | ||||||
| # Object files
 | main.o: main.c compressor.h | ||||||
| OBJS = $(SRCS:.c=.o) |   $(CC) $(CFLAGS) -c main.c | ||||||
| 
 | 
 | ||||||
| # Header files
 | compressor.o: compressor.c compressor.h | ||||||
| DEPS = compressor.h |   $(CC) $(CFLAGS) -c compressor.c | ||||||
| 
 | 
 | ||||||
| # Default rule
 |  | ||||||
| all: $(TARGET) |  | ||||||
| 
 |  | ||||||
| # Linking the executable
 |  | ||||||
| $(TARGET): $(OBJS) |  | ||||||
| 	$(CC) $(CFLAGS) -o $@ $^ |  | ||||||
| 
 |  | ||||||
| # Compiling source files into object files
 |  | ||||||
| %.o: %.c $(DEPS) |  | ||||||
| 	$(CC) $(CFLAGS) -c $< -o $@ |  | ||||||
| 
 |  | ||||||
| # Clean rule
 |  | ||||||
| clean: | clean: | ||||||
| 	rm -f $(OBJS) $(TARGET) |   rm -f *.o compressor | ||||||
| 
 |  | ||||||
| # Phony targets
 |  | ||||||
| .PHONY: all clean |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user