export SHELL = /bin/bash TARGET = p4web # Compiler flags CXX = g++ CC = gcc -v P4APIDIR = /home/perforce/p4api # Include paths # Library paths LDFLAGS = -L$(P4APIDIR)/lib \ -Wl \ # Additional libraries... LDLIBS = -lclient -lrpc -lsupp -lp4sslstub -lrt INCLUDES = -IMain \ -Iutil \ -I$(P4APIDIR)/include/p4 \ -IPanes \ -IViews \ -IHelp \ -IImages \ # Compiler flags use -O2 for release #DEBUG_LEVEL = -g CFLAGS = -D NDEBUG \ -m64 \ -D_GNU_SOURCE \ -DOS_LINUX \ -DOS_LINUX_26 \ -DOS_LINUXX86_64 \ -O2 \ -Wall \ -DUSE_SMARTHEAP \ -D ID_REL=\"13.4\" \ -D ID_OS=\"LINUX\" \ -D ID_PATCH=\"999\" \ -D ID_Y=\"2013\" \ -D ID_M=\"12\" \ -D ID_D=\"20\" \ -g # Builds all configurations for this project... #.PHONY: build_all_configurations # build_all_configurations: Debug SRC_FILES = Main/base64.cpp \ Main/main.cpp \ Main/p4wAllCommands.cpp \ Main/p4wProcess.cpp \ Main/p4wRequest.cpp \ Main/p4wStrBuf.cpp \ Main/p4wThread.cpp \ Main/p4wURL.cpp \ util/changeshelper.cpp \ util/fstathelper.cpp \ util/p4wHtml.cpp \ util/p4wI18n.cpp \ util/p4wJs.cpp \ util/p4wJsHier.cpp \ Panes/p4wAboutPane.cpp \ Panes/p4wAddPane.cpp \ Panes/p4wAddSelectPane.cpp \ Panes/p4wAnnotatePane.cpp \ Panes/p4wAnnFilelogPane.cpp \ Panes/p4wBranchDiffPane.cpp \ Panes/p4wBranchesPane.cpp \ Panes/p4wBranchPane.cpp \ Panes/p4wChangePane.cpp \ Panes/p4wChangePendingEditPane.cpp \ Panes/p4wChangesPane.cpp \ Panes/p4wClientPane.cpp \ Panes/p4wClientRootPane.cpp \ Panes/p4wClientsPane.cpp \ Panes/p4wCmdPane.cpp \ Panes/p4wConfigPane.cpp \ Panes/p4wDelConfirmPane.cpp \ Panes/p4wDeletePane.cpp \ Panes/p4wDepotPane.cpp \ Panes/p4wDescribeDefaultPane.cpp \ Panes/p4wDescribePane.cpp \ Panes/p4wDiffPane.cpp \ Panes/p4wDiff2DirsPane.cpp \ Panes/p4wDiff2FilesPane.cpp \ Panes/p4wEditLocalPane.cpp \ Panes/p4wEditLocalProcessorPane.cpp \ Panes/p4wEditPane.cpp \ Panes/p4wFileBrowserPane.cpp \ Panes/p4wFilelogPane.cpp \ Panes/p4wFilePane.cpp \ Panes/p4wFixedPane.cpp \ Panes/p4wFstatPane.cpp \ Panes/p4wFTypePane.cpp \ Panes/p4wGoPane.cpp \ Panes/p4wInfoPane.cpp \ Panes/p4wIntegPane.cpp \ Panes/p4wJobCmdPane.cpp \ Panes/p4wJobPane.cpp \ Panes/p4wJobsPane.cpp \ Panes/p4wJobSpecPane.cpp \ Panes/p4wLabelFilesPane.cpp \ Panes/p4wLabelPane.cpp \ Panes/p4wLabelReplacePane.cpp \ Panes/p4wLabelsPane.cpp \ Panes/p4wLockPane.cpp \ Panes/p4wLoginPane.cpp \ Panes/p4wLogoutPane.cpp \ Panes/p4wMatchPane.cpp \ Panes/p4wMenuPane.cpp \ Panes/p4wMimeContentPane.cpp \ Panes/p4wMultiUserPane.cpp \ Panes/p4wP4CmdPane.cpp \ Panes/p4wPane.cpp \ Panes/p4wPasswdTestPane.cpp \ Panes/p4wPreviewPane.cpp \ Panes/p4wPrintPane.cpp \ Panes/p4wReadLocalPane.cpp \ Panes/p4wResolveIAendPane.cpp \ Panes/p4wResolveIAPane.cpp \ Panes/p4wResolveIAProcessorPane.cpp \ Panes/p4wResolvePane.cpp \ Panes/p4wRevertPane.cpp \ Panes/p4wRSSJobsPane.cpp \ Panes/p4wRSSJobviewPane.cpp \ Panes/p4wRSSPane.cpp \ Panes/p4wRSSUserPane.cpp \ Panes/p4wRunPane.cpp \ Panes/p4wSpecPane.cpp \ Panes/p4wShowHideColsPane.cpp \ Panes/p4wSubmitDefPane.cpp \ Panes/p4wSubmittedChangesPane.cpp \ Panes/p4wSyncPane.cpp \ Panes/p4wThumbnailPane.cpp \ Panes/p4wUnlockPane.cpp \ Panes/p4wUpdatePane.cpp \ Panes/p4wUploadLocalPane.cpp \ Panes/p4wUploadLocalProcessorPane.cpp \ Panes/p4wUserPane.cpp \ Panes/p4wUsersPane.cpp \ Panes/p4wWherePane.cpp \ Panes/p4wWorkspacePane.cpp \ Views/p4wAboutView.cpp \ Views/p4wAddProcessorView.cpp \ Views/p4wAddSelectView.cpp \ Views/p4wAuthView.cpp \ Views/p4wBranchEditView.cpp \ Views/p4wBranchesView.cpp \ Views/p4wBranchView.cpp \ Views/p4wChangeEditView.cpp \ Views/p4wChangePendingEditView.cpp \ Views/p4wChangesProcessorView.cpp \ Views/p4wClientEditView.cpp \ Views/p4wClientsView.cpp \ Views/p4wClientView.cpp \ Views/p4wCmdProcessorView.cpp \ Views/p4wCmdView.cpp \ Views/p4wDeleteProcessorView.cpp \ Views/p4wDescribeDefaultView.cpp \ Views/p4wDescribeView.cpp \ Views/p4wEditLocalProcessorView.cpp \ Views/p4wEditProcessorView.cpp \ Views/p4wErrorView.cpp \ Views/p4wFileBrowserView.cpp \ Views/p4wFTProcessorView.cpp \ Views/p4wJobCmdView.cpp \ Views/p4wJobEditView.cpp \ Views/p4wHelpView.cpp \ Views/p4wIntegProcessorView.cpp \ Views/p4wIconView.cpp \ Views/p4wJobSpecView.cpp \ Views/p4wJobsView.cpp \ Views/p4wJobView.cpp \ Views/p4wLabelEditView.cpp \ Views/p4wLabelsView.cpp \ Views/p4wLabelView.cpp \ Views/p4wLabSyncProcView.cpp \ Views/p4wLockProcessorView.cpp \ Views/p4wLoginView.cpp \ Views/p4wLogoutStartView.cpp \ Views/p4wLogoutView.cpp \ Views/p4wMenuProcessorView.cpp \ Views/p4wMimeContentView.cpp \ Views/p4wPasswdTestView.cpp \ Views/p4wPathBrowserView.cpp \ Views/p4wPrintView.cpp \ Views/p4wRelocate.cpp \ Views/p4wResolveIAProcessorView.cpp \ Views/p4wResolveProcessorView.cpp \ Views/p4wRevertProcessorView.cpp \ Views/p4wRSSJobsView.cpp \ Views/p4wRSSJobviewView.cpp \ Views/p4wRSSUserView.cpp \ Views/p4wRSSView.cpp \ Views/p4wRunView.cpp \ Views/p4wSubmitView.cpp \ Views/p4wSyncProcessorView.cpp \ Views/p4wTextContentView.cpp \ Views/p4wThumbnailView.cpp \ Views/p4wUnlockProcessorView.cpp \ Views/p4wUploadLocalProcessorView.cpp \ Views/p4wUserEditView.cpp \ Views/p4wUsersView.cpp \ Views/p4wUserView.cpp \ Views/p4wView.cpp \ Views/p4wWorkspaceFileView.cpp \ SRCDIR = . OBJDIR = Objects SRCS := $(shell find $(SRCDIR) -name '*.cpp') SRCDIRS := $(shell find . -name '*.cpp' -exec dirname {} \; | uniq) OBJ_FILES := $(patsubst %.cpp,$(OBJDIR)/%.o,$(SRC_FILES)) all: $(TARGET) $(TARGET) : buildObjDirs $(OBJ_FILES) @echo before steph @echo $< @echo after steph $(CXX) $(OBJ_FILES) $(LDFLAGS) $(LDLIBS) -o $@ $(OBJDIR)/%.o: %.cpp $(CXX) $(CFLAGS) $(INCLUDES) -c $< -o $@ # Cleans intermediate and output files (objects, libraries, executables)... .PHONY: clean clean: rm -f Panes/*.o rm -f Main/*.o rm -f Views/*.o rm -f util/*.o rm -f Images/*.o rm -f ./p4web rm -rf $(OBJDIR) #depend: $(SRC_FILES) # makedepend $(INCLUDES) $^ buildObjDirs: @$(call make-objdirs) define make-objdirs for dir in $(SRCDIRS); \ do \ mkdir -p $(OBJDIR)/$$dir; \ done endef