git » fp-git.git » commit 231a1bb

Makefile to use with DEVCPP (this is a makefile, not a project file!)

author orspeeder
2006-04-24 00:04:24 UTC
committer orspeeder
2006-04-24 00:04:24 UTC
parent b077cd044aeae4c533d1e95a694a438a68f7b584

Makefile to use with DEVCPP (this is a makefile, not a project file!)

FP/src/makefile.devcpp +255 -0

diff --git a/FP/src/makefile.devcpp b/FP/src/makefile.devcpp
new file mode 100644
index 0000000..1390ede
--- /dev/null
+++ b/FP/src/makefile.devcpp
@@ -0,0 +1,255 @@
+#Makefile done by H\xe9lder Maur\xedcio Gomes Ferreira Filho (Speeder)
+#I assume that you have already set the %path% variable to the right places.
+#Example %path% (the one that I used to create this file).
+# set path=%path%;c:\dev-cpp\bin;c:\awk\bin
+
+############
+# Programs #
+############
+
+CC       = @gcc.exe
+INFO       = @echo
+LINKER     = @gcc.exe
+MAKEDIR    = @mkdir
+AWK        = @gawk
+
+#####################
+# Operating Systems #
+#####################
+
+LINUX = -DNOLINUX
+SRC2  = getopt.o getopt1.o SDL_win32_main.o
+OS    = Win32
+
+####################
+# Compiler options #
+####################
+
+#Libraries: include path and linked libs
+INCLUDE       = -Iinclude -Iports\include -Iports\include\sdl
+LIBS	  = SDL.lib
+
+#Defines
+DEFINES       = -DOS=\"$(OS)\" $(LINUX) -DOUTPUT_FULLSCREEN
+
+#Release type
+# RELEASE may be:
+#  -g -Wall -ansi -pedantic	for debug
+#  -O2			     for release
+# LINKERRELEASE may be:
+#  -s			      for release
+RELEASE       =  
+LINKERRELEASE = -s
+
+#Binary code files
+OBJFILES      = main.o kernel.o resources.o dat.o disk.o compress.o \
+		output.o maps.o config.o room.o titles.o \
+		input.o kid.o states.o tiles.o walls.o anims.o object.o\
+		$(SRC2)
+EXEFILE       = bin\freeprince.exe
+
+GENERATEDRESHEADERS = include/res_conf_parts.h include/res_conf_files.h\
+                      include/res_conf_types.h include/res_conf_mods.h\
+                      include/res_conf_resources.h
+GENERATEDSTAHEADERS = include/states_conf_static.h \
+                      include/states_conf_flags.h
+#include/states_conf_properties.h
+GENERATEDTILHEADERS = include/tiles_conf_types.h include/tiles_conf_groups.h
+
+GENERATEDOTHHEADERS = include/walls_conf.h include/anims_conf.h include/text_conf.h\
+                      include/room_conf.h
+
+#Use this to temporary remove an option
+OPTIONS       = $(INCLUDE) $(DEFINES) $(RELEASE)
+LINKEROPTIONS = $(LINKERRELEASE)
+
+#############
+# main file #
+#############
+
+$(EXEFILE): $(OBJFILES)
+	$(INFO) Linking files...
+	@rem if not exist bin mkdir bin
+	$(LINKER) $(OBJFILES) $(LIBS) $(LINKEROPTIONS) -o $(EXEFILE)
+	$(INFO) Program successfully compiled
+
+
+###################
+# command options #
+###################
+
+clean:
+	$(INFO) Erasing temporary object files...
+	del *.o
+
+build: clean $(EXEFILE)
+
+all: index build
+
+headers: $(GENERATEDRESHEADERS) $(GENERATEDSTAHEADERS) $(GENERATEDTILHEADERS)\
+         $(GENERATEDOTHHEADERS)
+
+install: download build
+
+################
+# Source files #
+################
+
+main.o: main.c include\kernel.h include\main.h
+	$(INFO) Compiling command line parser...
+	$(CC) $(OPTIONS) -c main.c
+
+resources.o: res\resources.c include\resources.h include\compress.h \
+	     include\dat.h include\disk.h include\res_conf.h
+	$(INFO) Compiling main resource manager module...
+	$(CC) $(OPTIONS) -c res\resources.c
+
+disk.o: res\disk.c include\memory.h include\disk.h include\resources.h include\res_conf.h
+	$(INFO) Compiling resource disk access library...
+	$(CC) $(OPTIONS) -c res\disk.c
+
+dat.o: res\dat.c include\disk.h include\dat.h
+	$(INFO) Compiling resource dat editing library...
+	$(CC) $(OPTIONS) -c res\dat.c
+
+kernel.o: ker\kernel.c include\kernel.h include\resources.h include\res_conf.h include\output.h
+	$(INFO) Compiling main kernel...
+	$(CC) $(OPTIONS) -c ker\kernel.c
+
+room.o: ker\room.c include\room.h include\resources.h include\res_conf.h
+	$(INFO) Compiling kernel room object...
+	$(CC) $(OPTIONS) -c ker\room.c
+
+kid.o: ker\kid.c include\kid.h include\resources.h include\res_conf.h
+	$(INFO) Compiling kernel kid object...
+	$(CC) $(OPTIONS) -c ker\kid.c
+
+titles.o: ker\titles.c include\resources.h include\res_conf.h
+	$(INFO) Compiling kernel titles module...
+	$(CC) $(OPTIONS) -c ker\titles.c
+
+compress.o: res\compress.c include\compress.h include\memory.h \
+	    include\disk.h
+	$(INFO) Compiling resource compression module...
+	$(CC) $(OPTIONS) -c res\compress.c
+
+maps.o: res\maps.c include\maps.h
+	$(INFO) Compiling resource map handling module...
+	$(CC) $(OPTIONS) -c res\maps.c
+
+output.o: out\output.c include\resources.h include\res_conf.h
+	$(INFO) Compiling main output module...
+	$(CC) $(OPTIONS) -c out\output.c
+
+states.o: ker/states.c include/states.h include/states_conf.h\
+	  include/resources.h include/res_conf.h include/types.h\
+	include/tiles.h include/tiles_conf.h
+	$(INFO) Compiling kernel states module...
+	$(CC) $(OPTIONS) -c ker\states.c 
+
+tiles.o: res/tiles.c include/tiles.h include/tiles_conf.h
+	$(INFO) Compiling resource tile classification module...
+	$(CC) $(OPTIONS) -c res\tiles.c
+
+input.o: out\input.c include\input.h
+	$(INFO) Compiling main input module...
+	$(CC) $(OPTIONS) -c out\input.c
+
+config.o: res\config.c include\resources.h include\res_conf.h
+	$(INFO) Compiling resource configuration module...
+	$(CC) $(OPTIONS) -c res\config.c
+walls.o: res\walls.c include\walls.h include\walls_conf.h
+	$(INFO) Compiling wall algorithm module...
+	$(CC) $(OPTIONS) -c res\walls.c
+
+anims.o: res\anims.c include\anims.h include\anims_conf.h
+	$(INFO) Compiling animation loader module...
+	$(CC) $(OPTIONS) -c res\anims.c
+	
+object.o: ker\object.c include\object.h include\resources.h include\res_conf.h\
+	include\states.h include\res_conf.h\
+	include\types.h include\tiles.h include\tiles_conf.h include\output.h\
+	include\kid.h
+	$(INFO) Compiling kernel kid object support...
+	$(CC) $(OPTIONS) -c ker\object.c
+
+
+
+#AWK scripts: header generation
+include/res_conf.h: $(GENERATEDRESHEADERS)
+
+include/res_conf_parts.h: conf/parts.conf conf/awk/res_conf_parts.awk
+	$(INFO) Creating resource id parts configuration file...
+	$(AWK) -f conf/awk/res_conf_parts.awk conf/parts.conf>include/res_conf_parts.h
+
+include/res_conf_files.h: conf/files.conf conf/awk/res_conf_files.awk
+	$(INFO) Creating resource dat files list configuration file...
+	$(AWK) -f conf/awk/res_conf_files.awk conf/files.conf>include/res_conf_files.h
+
+include/res_conf_types.h: conf/types.conf conf/awk/res_conf_types.awk
+	$(INFO) Creating resource types configuration file...
+	$(AWK) -f conf/awk/res_conf_types.awk conf/types.conf>include/res_conf_types.h
+
+include/res_conf_mods.h: conf/mods.conf conf/awk/res_conf_mods.awk
+	$(INFO) Creating resource modifiers configuration file...
+	$(AWK) -f conf/awk/res_conf_mods.awk conf/mods.conf>include/res_conf_mods.h
+
+include/res_conf_resources.h: conf/resources.conf conf/awk/res_conf_resources.awk
+	$(INFO) Creating resource list configuration file...
+	$(AWK) -f conf/awk/res_conf_resources.awk conf/resources.conf>include/res_conf_resources.h
+
+include/states_conf.h: $(GENERATEDSTAHEADERS)
+
+include/states_conf_static.h: conf/awk/states_conf_static.awk conf/states/*.conf
+	$(INFO) Creating states list configuration file...
+	$(AWK) -f conf/awk/states_conf_static.awk conf/states/*.conf>include/states_conf_static.h
+
+#include/states_conf_properties.h: conf/statesproperties.conf conf/awk/states_conf_properties.awk
+#	$(INFO) Creating states condition properties configuration file...
+#	$(AWK) -f conf/awk/states_conf_properties.awk conf/statesproperties.conf>include/states_conf_properties.h
+
+include/states_conf_flags.h: conf/flags.conf conf/awk/states_conf_flags.awk
+	$(INFO) Creating states frame flags configuration file...
+	$(AWK) -f conf/awk/states_conf_flags.awk conf/flags.conf>include/states_conf_flags.h
+
+include/tiles_conf.h: $(GENERATEDTILHEADERS)
+
+include/tiles_conf_types.h: conf/tiles.conf conf/awk/tiles_conf_types.awk
+	$(INFO) Creating tile list configuration file...
+	$(AWK) -f conf/awk/tiles_conf_types.awk conf/tiles.conf>include/tiles_conf_types.h
+
+include/tiles_conf_groups.h: conf/tiles.conf conf/awk/tiles_conf_groups.awk
+	$(INFO) Creating tile groups configuration file...
+	$(AWK) -f conf/awk/tiles_conf_groups.awk conf/tiles.conf>include/tiles_conf_groups.h
+
+include/walls_conf.h: conf/walls.conf conf/awk/walls_conf.awk
+	$(INFO) Creating wall algorithm randomization file...
+	$(AWK) -f conf/awk/walls_conf.awk conf/walls.conf>include/walls_conf.h
+
+include/anims_conf.h: conf/anims.conf conf/awk/anims_conf.awk
+	$(INFO) Binding animation indexes to the source...
+	$(AWK) -f conf/awk/anims_conf.awk conf/anims.conf>include/anims_conf.h
+
+include/text_conf.h: conf/alphabet.conf conf/awk/text_conf.awk
+	$(INFO) Generating font alphabet...
+	$(AWK) -f conf/awk/text_conf.awk conf/alphabet.conf>include/text_conf.h
+
+include/room_conf.h: conf/room.conf conf/awk/room_conf.awk
+	$(INFO) Generating room drawing code...
+	$(AWK) -f conf/awk/room_conf.awk conf/room.conf>include/room_conf.h
+
+
+
+
+
+getopt.o: ports\getopt.c
+	$(INFO) Porting the Unix-like getopt function (first part)...
+	$(CC) $(OPTIONS) -c ports\getopt.c
+
+getopt1.o: ports\getopt1.c
+	$(INFO) Porting the Unix-like getopt function (second part)...
+	$(CC) $(OPTIONS) -c ports\getopt1.c
+
+SDL_win32_main.o: ports\SDL_win32_main.c
+	$(INFO) Porting the SDL main function...
+	$(CC) $(OPTIONS) -c ports\SDL_win32_main.c