Send .o files to bin folder.

This commit is contained in:
Steve 2018-04-29 16:44:06 +01:00
parent aad8551c84
commit 02129ada33
5 changed files with 31 additions and 25 deletions

1
.gitignore vendored
View File

@ -34,6 +34,7 @@ tbftss
*.dSYM/
# folders
bin
dist
dev/*
!dev/screenshots

View File

@ -2,39 +2,44 @@ VERSION = 1.3
REVISION = 1
LOCALE_MO = $(patsubst %.po,%.mo,$(wildcard locale/*.po))
OUT = bin
SEARCHPATH += src/ src/battle src/challenges src/draw src/game src/galaxy src/json src/system src/test
vpath %.c $(SEARCHPATH)
vpath %.h $(SEARCHPATH)
DEPS += defs.h structs.h
OBJS += ai.o
OBJS += battle.o bullets.o
OBJS += capitalShips.o challengeHome.o challenges.o cJSON.o controls.o credits.o
OBJS += debris.o dev.o draw.o
OBJS += effects.o entities.o
OBJS += fighters.o fighterDatabase.o
OBJS += galacticMap.o game.o
OBJS += hud.o
OBJS += i18n.o init.o input.o io.o items.o
OBJS += jumpgate.o
OBJS += load.o locations.o lookup.o
OBJS += main.o messageBox.o mine.o mission.o missionInfo.o modalDialog.o
OBJS += objectives.o options.o
OBJS += player.o
OBJS += quadtree.o
OBJS += radar.o resources.o rope.o
OBJS += save.o script.o sound.o spawners.o starfield.o starSystems.o stats.o
OBJS += testMission.o textures.o text.o title.o transition.o trophies.o
OBJS += util.o
OBJS += waypoints.o widgets.o
_OBJS += ai.o
_OBJS += battle.o bullets.o
_OBJS += capitalShips.o challengeHome.o challenges.o cJSON.o controls.o credits.o
_OBJS += debris.o dev.o draw.o
_OBJS += effects.o entities.o
_OBJS += fighters.o fighterDatabase.o
_OBJS += galacticMap.o game.o
_OBJS += hud.o
_OBJS += i18n.o init.o input.o io.o items.o
_OBJS += jumpgate.o
_OBJS += load.o locations.o lookup.o
_OBJS += main.o messageBox.o mine.o mission.o missionInfo.o modalDialog.o
_OBJS += objectives.o options.o
_OBJS += player.o
_OBJS += quadtree.o
_OBJS += radar.o resources.o rope.o
_OBJS += save.o script.o sound.o spawners.o starfield.o starSystems.o stats.o
_OBJS += testMission.o textures.o text.o title.o transition.o trophies.o
_OBJS += util.o
_OBJS += waypoints.o widgets.o
OBJS = $(patsubst %,$(OUT)/%,$(_OBJS))
# top-level rule to create the program.
all: $(PROG) $(LOCALE_MO)
# compiling other source files.
%.o: %.c %.h $(DEPS)
$(CC) $(CFLAGS) $(CXXFLAGS) -c $<
$(OUT)/%.o: %.c %.h $(DEPS)
@mkdir -p $(OUT)
$(CC) $(CFLAGS) $(CXXFLAGS) -c -o $@ $<
%.mo: %.po
msgfmt -c -o $@ $<

View File

@ -15,7 +15,7 @@ INST_ICON_DIR = $(DESTDIR)$(ICON_DIR)
INST_DESKTOP_DIR = $(DESTDIR)$(DESKTOP_DIR)
SEARCHPATH += src/plat/unix
OBJS += unixInit.o
_OBJS += unixInit.o
include common.mk

View File

@ -5,7 +5,7 @@ DATA_DIR = /mnt/utmp/tbftss/data
LOCALE_DIR = /usr/share/locale
SEARCHPATH += src/plat/unix
OBJS += unixInit.o
_OBJS += unixInit.o
include common.mk

View File

@ -5,7 +5,7 @@ LIBPATH = /usr/x86_64-w64-mingw32/lib
LOCALE_DIR = locale
SEARCHPATH += src/plat/win32
OBJS += win32Init.o
_OBJS += win32Init.o
CXXFLAGS += `$(SDLC) --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DDATA_DIR=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\"
CXXFLAGS += -ansi