Get rid of nasty GNU Make extensions.
This commit is contained in:
		
							parent
							
								
									621f71585e
								
							
						
					
					
						commit
						d3983790ab
					
				
							
								
								
									
										10
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								Makefile
									
									
									
									
									
								
							@ -1,14 +1,16 @@
 | 
			
		||||
.SUFFIXES: .c .o
 | 
			
		||||
 | 
			
		||||
SRCS = boot.c
 | 
			
		||||
LDFLAGS = -flto -T linker.ld -nostdlib -Os
 | 
			
		||||
CFLAGS = -flto -ffreestanding -fno-builtin -fno-pie -Wall -std=c2x -m16 -nostdlib -Os -nostartfiles -r
 | 
			
		||||
 | 
			
		||||
%.o: %.c
 | 
			
		||||
	$(CC) $^ -o $@ $(CFLAGS)
 | 
			
		||||
.c.o:
 | 
			
		||||
	$(CC) $< -o $@ $(CFLAGS)
 | 
			
		||||
 | 
			
		||||
bin: $(SRCS:.c=.o)
 | 
			
		||||
	$(CC) $(LDFLAGS) -o bin $^
 | 
			
		||||
	$(CC) $(LDFLAGS) -o bin $(SRCS:.c=.o)
 | 
			
		||||
 | 
			
		||||
all: bin
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	$(RM) $(SRCS:.c=.o) bin
 | 
			
		||||
	rm -f $(SRCS:.c=.o) bin
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user