mirror of
				https://gitlab.com/klmp200/LO27.git
				synced 2025-10-31 04:33:03 +00:00 
			
		
		
		
	Changement d'architecture de projet
This commit is contained in:
		
							
								
								
									
										27
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								Makefile
									
									
									
									
									
								
							| @@ -8,37 +8,33 @@ CFLAGS=-Wall -Werror -pedantic -fpic -g -std=c89 | ||||
| EXTLIBS=`sdl2-config --cflags --libs` | ||||
|  | ||||
| LIBSDIR=-L/usr/lib -L./Libs | ||||
| INCLUDEDIR=-I/usr/include -I. -I./LibAutomaton -I./LibGui | ||||
| INCLUDEDIR=-I/usr/include -I. -I./LibMatrix -I./LibGui | ||||
|  | ||||
| #Exe test variables | ||||
| TARGET=main | ||||
| SOURCE=main | ||||
| TARGET=Matrix.exe | ||||
| SOURCE=matrixmain | ||||
|  | ||||
| SOURCECFILE=$(SOURCE:=.c) | ||||
| SOURCEOFILE=$(SOURCE:=.o) | ||||
|  | ||||
| DEPENDENCELIST=libAutomaton.so libGui.so | ||||
| DEPENDENCENAMEONE=Automaton | ||||
| DEPENDENCELIST=libMatrix.so libGui.so | ||||
| DEPENDENCENAMEONE=Matrix | ||||
| DEPENDENCENAMETWO=Gui | ||||
|  | ||||
|  | ||||
| all: $(TARGET) | ||||
| #Generating the main.exe | ||||
| $(TARGET): $(SOURCEOFILE) $(DEPENDENCELIST) lib | ||||
| $(TARGET): $(SOURCEOFILE) lib | ||||
| 	@echo "\n Generating the " $(TARGET) " binary" | ||||
| 	mkdir -p build | ||||
| 	$(CC) $(SOURCEOFILE) $(LIBSDIR) $(EXTLIBS) -l$(DEPENDENCENAMEONE) -l$(DEPENDENCENAMETWO) -o ./build/$(TARGET) | ||||
|  | ||||
| #Generating the library binary | ||||
| lib: | ||||
| 	@echo "\n Generating the automaton library binary" | ||||
| 	$(MAKE) -C LibGui | ||||
|  | ||||
| $(DEPENDENCELIST): | ||||
| 	@echo "\n Generating the automaton library binary" | ||||
| 	@echo "\n Generating the gui library binary" | ||||
| 	mkdir -p Libs | ||||
| 	$(MAKE) -C LibAutomaton | ||||
|  | ||||
| 	$(MAKE) -C LibMatrix | ||||
| 	$(MAKE) -C LibGui | ||||
|  | ||||
| #Generating object files | ||||
| .c.o: | ||||
| @@ -49,5 +45,6 @@ $(DEPENDENCELIST): | ||||
| #Cleaning | ||||
| clean: | ||||
| 	@echo "\n Cleaning" | ||||
| 	rm -rf *.o ./Libs/*.so *.exe | ||||
| 	$(MAKE) -C LibAutomaton clean | ||||
| 	rm -rf *.o ./Libs/*.so ./build/$(TARGET) | ||||
| 	$(MAKE) -C LibMatrix clean | ||||
| 	$(MAKE) -C LibGui clean | ||||
|   | ||||
		Reference in New Issue
	
	Block a user