BloccSpacc/Makefile

29 lines
597 B
Makefile
Raw Normal View History

2022-08-01 23:11:07 +02:00
AppName = BloccSpacc
2022-08-04 00:39:06 +02:00
ExeSuffix = .exe
2022-08-01 23:11:07 +02:00
Sources = $(wildcard Source/*.c)
Objects = $(Sources:.c=.o)
2022-08-04 00:39:06 +02:00
Defines = -DTarget_PC
2022-08-01 23:11:07 +02:00
CFlags = -O2
LdFlags = -lSDL -lSDL_gfx -lSDL_image -lSDL_mixer -lSDL_ttf
2022-08-04 00:39:06 +02:00
CC = gcc $(Defines)
ifdef Target
ifeq ($(Target), PocketGo)
ExeSuffix = .PocketGo.exe
PathPrefix = /opt/miyoo/bin/arm-miyoo-linux-uclibcgnueabi
Defines = -DTarget_PocketGo
CC = $(PathPrefix)-gcc $(Defines)
endif
endif
2022-08-01 23:11:07 +02:00
all: $(AppName)
$(AppName): $(Objects)
2022-08-04 00:39:06 +02:00
$(CC) $^ $(CFlags) $(LdFlags) -o $(AppName)$(ExeSuffix)
2022-08-01 23:11:07 +02:00
clean:
2022-08-04 00:39:06 +02:00
rm -f Source/*.o $(AppName)$(ExeSuffix) $(AppName).*$(ExeSuffix)