Skip to content

Latest commit

 

History

History
212 lines (165 loc) · 6.96 KB

Makefile.org

File metadata and controls

212 lines (165 loc) · 6.96 KB

########################################################################## ### Copyright (c) 1999, 2000, 2001 Sony Computer Entertainment America Inc. ### All rights reserved. ### ### Boilerplate Makefile by Bret Mogilefsky (mogul@playstation.sony.com) ### and Tyler Daniel (tyler_daniel@playstation.sony.com) ### ### Use this makefile as a template for new projects! ### ### General Features: ### ### Just specify SRCS and go! ### Automatic and minimal (fast!) dependency generation (for vu microcode as well) ### Allows keeping source and headers from src and include dirs, or elsewhere. ### Builds in a subdirectory. ### Allows additional defines, include dirs, and lib dirs without ### specifying -D, -I, and -L ### Easy to specify parallel builds (debug, optimized, release, etc) ### Easy to add flags on a per-file, per-build, or per-file-build basis ### Can specify parent projects to make first (libraries) ### Builds libraries ### Slices, dices, feeds your cat, calls your mum. ### ### VU microcode features: ### ### Generates depencies for microcode (for .include and #include) ### Uses a preprocessing script to manage registers (configurable) ### Runs the c preprocessor over microcode - you can use #define and #include ### freely (and share #defines with c/c++) ### Support for vcl ### ### Useful targets: ### ### run Run the executable. ### xrun Run the executable under a new xterminal. ### clean Remove everything we can rebuild. ### tags Generate source-browsing tags for Emacs. ### documentation Use doxygen to generate docs in docs/html/doxygen_generated ### ### Using builds: ### ### To specify a particular build include the name of the build anywhere on ### the command line: ### make xrun optimized, ### make clean optimized, etc. ### ### Included builds (add your own!): ### debug ### optimized (default) ### release ### ### CodeWarrior builds: ### cw_debug ### cw_optimized ### cw_release ### ### For more info see the “Build Options” section below ##########################################################################

########################################################################## ### Target ##########################################################################

TARGET = libps2gl.a

########################################################################## ### Files and Paths - this is probably the only section you’ll need to change ##########################################################################

SRCS += $(wildcard .cpp) SRCS += $(foreach DIR,$(SRCDIRS),$(subst $(DIR)/,,$(wildcard $(DIR)/.cpp)))

SRCS += $(wildcard .c) SRCS += $(foreach DIR,$(SRCDIRS),$(subst $(DIR)/,,$(wildcard $(DIR)/.c)))

SRCS += $(wildcard *_vcl.vsm) SRCS += $(foreach DIR,$(SRCDIRS),$(subst $(DIR)/,,$(wildcard $(DIR)/*_vcl.vsm)))

OBJS =

LIBS =

INCDIRS = include ../ps2stuff/include vu1

LIBDIRS =

SRCDIRS = src vu1

OBJDIRBASE = objs

DEPDIRBASE = deps

MAKEPARENTS = ../ps2stuff

SCEDIR = $(PS2SDK) PS2DEVDIR = $(PS2SDK)

PS2STUFF = ../ps2stuff

########################################################################## ### Common Options (shared across builds) ##########################################################################

DEFINES =

OPTFLAGS = -fno-rtti -G 0

DEBUGFLAGS = -Wall # -Winline

DEBUGFLAGS += -Wa,-alh

DEBUGFLAGS += -fno-strict-aliasing

DEBUGFLAGS += -fno-common

RUNARGS =

########################################################################## ### Build Options - applied per-build ##########################################################################

include $(PS2STUFF)/Makefile.builds

########################################################################## ### Per-file Options ##########################################################################

########################################################################## ### Per-file, per-build Options ##########################################################################

########################################################################## ### Makefile operation ##########################################################################

PRINT_MSGS = 1

PRINT_CMDS = 0

########################################################################## ### include the makefile that does all the work ##########################################################################

include $(PS2STUFF)/Makefile.work

ifeq ($(GCC_MAJOR),3) DEBUGFLAGS += -Wno-deprecated endif

########################################################################## ### Rules for this project ##########################################################################

documentation: $(SILENCE)doxygen docs/doxygen.config