PixelWars/Makefile

37 lines
663 B
Makefile

CC=gcc
ifdef SystemRoot
RM=del /Q
FixPath=$(subst /,\,$1)
BINARY=PixelWars.exe
LIB=-lSDL -lm -L./lib
FLAGS=-Wall -I./include
else
ifeq ($(shell uname), Linux)
RM=rm -f
FixPath=$1
BINARY=PixelWars
LIB=-lSDL -lm
FLAGS=-g -Wall
endif
endif
all : $(BINARY)
orange : orange.o
purple : purple.o
main : main.o generator.o
$(BINARY) : orange.o purple.o main.o generator.o
$(CC) main.o generator.o orange.o purple.o -o $(BINARY) $(LIB)
anselme : orange.o purple.o main.o generator_anselme.o
$(CC) main.o generator_anselme.o orange.o purple.o -o $(BINARY) $(LIB)
%.o: %.c
$(CC) -o $@ -c $< $(FLAGS)
clean :
$(RM) *.o $(BINARY) *.stackdump *~