| 
									
										
										
										
											2025-01-02 20:57:00 -05:00
										 |  |  | CC=gcc | 
					
						
							|  |  |  | CFLAGS=-Wall -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 | 
					
						
							| 
									
										
										
										
											2024-08-28 17:27:35 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-02 20:57:00 -05:00
										 |  |  | .PHONY: clean run | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-19 09:56:33 -05:00
										 |  |  | game: data/actions.c data/rooms.c data/words.c data/flags.c *.c | 
					
						
							| 
									
										
										
										
											2025-01-02 20:57:00 -05:00
										 |  |  | 	$(CC) *.c $(CFLAGS) -o game | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-12 19:50:11 -05:00
										 |  |  | data/%.c: data/%.txt | 
					
						
							| 
									
										
										
										
											2025-01-18 06:43:22 -05:00
										 |  |  | 	echo "char *data_$*_txt = " > data/$*.c | 
					
						
							|  |  |  | 	cat data/$*.txt | \
 | 
					
						
							|  |  |  | 	perl -pe 's/ *\| */|/g' | \
 | 
					
						
							|  |  |  | 	perl -pe 's/^/"/' | \
 | 
					
						
							|  |  |  | 	perl -pe 's/$$/\\n"/' >> data/$*.c | 
					
						
							|  |  |  | 	echo ";" >> data/$*.c | 
					
						
							| 
									
										
										
										
											2025-01-11 08:30:48 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-02 20:57:00 -05:00
										 |  |  | run: game | 
					
						
							| 
									
										
										
										
											2024-08-28 17:27:35 -04:00
										 |  |  | 	./game | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | clean: | 
					
						
							|  |  |  | 	rm -f ./game | 
					
						
							| 
									
										
										
										
											2025-01-18 06:43:22 -05:00
										 |  |  | 	rm -f ./data/*.c |