PixelWars/Makefile
2015-01-12 17:37:19 +01:00

32 lines
481 B
Makefile

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