This repository has been archived on 2019-08-09. You can view files and clone it, but cannot push or open issues or pull requests.
PILG/Makefile.win

37 lines
1 KiB
Makefile
Raw Normal View History

# Variables
## Pour make
.PHONY: clean, mrproper
## Compilation
CXX = g++
CXXFLAGS = -lmingw32 -lSDLmain -lSDL -static-libgcc -static-libstdc++
CXXFLAGSDEBUG = -lmingw32 -lSDLmain -lSDL -static-libgcc -static-libstdc++ -DDEBUG
## Chemins
EXEPATH = bin/
OBJPATH = obj/
SRCPATH = src/
# Programmes possibles
main: $(EXEPATH)main
testing: $(EXEPATH)testing
# Éxecutables
$(EXEPATH)main: $(OBJPATH)main.o $(OBJPATH)image.o
$(CXX) $^ -o $@ $(CXXFLAGS)
$(EXEPATH)testing: $(OBJPATH)testing.o $(OBJPATH)image.o
$(CXX) $^ -o $@ $(CXXFLAGSDEBU2)
# Dépendances
## Fichiers executables
$(OBJPATH)main.o: $(SRCPATH)main.cpp $(SRCPATH)affichageFenetre.cpp $(SRCPATH)image.cpp $(SRCPATH)traitementImage.cpp $(SRCPATH)analyserCommande.cpp
$(CXX) -c $< -o $@ $(CXXFLAGS)
$(OBJPATH)testing.o: $(SRCPATH)testing.cpp $(SRCPATH)affichageFenetre.cpp $(SRCPATH)image.cpp $(SRCPATH)traitementImage.cpp $(SRCPATH)analyserCommande.cpp
$(CXX) -c $< -o $@ $(CXXFLAGSDEBUG)
## Bibliothèques
$(OBJPATH)image.o: $(SRCPATH)image.cpp
$(CXX) -c $< -o $@
# Meta
clean:
rm -rf $(OBJPATH)*.o