mirror of
https://github.com/SWG-Source/client-tools.git
synced 2026-09-28 15:13:10 -04:00
77 lines
3.7 KiB
Makefile
77 lines
3.7 KiB
Makefile
# Experimental makefile for Miff-Unix
|
|
|
|
INCLUDE_DIRS = \
|
|
-I../../../../../shared/library/sharedCompression/include/public \
|
|
-I../../../../../shared/library/sharedDebug/include/public \
|
|
-I../../../../../shared/library/sharedFile/include/public \
|
|
-I../../../../../shared/library/sharedFoundation/include/public \
|
|
-I../../../../../shared/library/sharedFoundationTypes/include/public \
|
|
-I../../../../../shared/library/sharedMemoryManager/include/public \
|
|
-I../../../../../shared/library/sharedThread/include/public \
|
|
-I../../../../../../external/3rd/library/stlport453/stlport \
|
|
-I../../../../../../external/ours/library/fileInterface/include/public
|
|
|
|
GPP_FLAGS = -g -Wall -Wno-unused -Wno-unknown-pragmas -Werror -Wno-ctor-dtor-privacy -D_DEBUG -D__STL_NO_BAD_ALLOC -DLINUX $(INCLUDE_DIRS) # Always builds with debugging info
|
|
GCC_FLAGS = -w #no warnings for code generated by yacc -- it's not our fault
|
|
|
|
LIBS = \
|
|
../../../../../../compile/linux/sharedCompression/debug/libsharedCompression_d.a \
|
|
../../../../../../compile/linux/sharedDebug/debug/libsharedDebug_d.a \
|
|
../../../../../../compile/linux/sharedFile/debug/libsharedFile_d.a \
|
|
../../../../../../compile/linux/sharedFoundation/debug/libsharedFoundation_d.a \
|
|
../../../../../../compile/linux/sharedMath/debug/libsharedMath_d.a \
|
|
../../../../../../compile/linux/sharedMemoryManager/debug/libsharedMemoryManager_d.a \
|
|
../../../../../../compile/linux/sharedRandom/debug/libsharedRandom_d.a \
|
|
../../../../../../compile/linux/sharedSynchronization/debug/libsharedSynchronization_d.a \
|
|
../../../../../../compile/linux/sharedThread/debug/libsharedThread_d.a \
|
|
../../../../../../external/3rd/library/stlport453/lib/libstlport_gcc.a \
|
|
../../../../../../external/ours/library/fileInterface/build/linux/output/debug/libfileInterface.a \
|
|
../../../../../../external/ours/library/archive/build/linux/output/debug/libarchive.a \
|
|
../../../../../../external/ours/library/unicode/compile/linux/Debug/libunicode.a \
|
|
../../../../../../external/ours/library/unicodeArchive/build/linux/output/debug/libunicodeArchive.a \
|
|
../../../../../../external/ours/library/localization/compile/linux/Debug/libLocalization.a \
|
|
../../../../../../external/ours/library/localizationArchive/compile/linux/Debug/libLocalizationArchive.a \
|
|
-lncurses -lz -ldl
|
|
|
|
|
|
SRCDIR = ../../src/linux
|
|
OBJDIR = ../../src/linux
|
|
OBJS = $(addprefix $(OBJDIR)/, lex_yy.o parser.o miff.o InputFileHandler.o OutputFileHandler.o)
|
|
|
|
miff: $(OBJS) $(LIBS)
|
|
g++ $(OBJS) $(LIBS) -lpthread -g -o miff
|
|
|
|
$(OBJDIR)/lex_yy.o: $(SRCDIR)/lex_yy.c $(SRCDIR)/parser.h
|
|
gcc $(GCC_FLAGS) $(SRCDIR)/lex_yy.c -c -g -o $(OBJDIR)/lex_yy.o
|
|
|
|
$(OBJDIR)/parser.o: $(SRCDIR)/parser.c $(SRCDIR)/parser.h
|
|
gcc $(GCC_FLAGS) $(SRCDIR)/parser.c -c -g -o $(OBJDIR)/parser.o
|
|
|
|
$(OBJDIR)/miff.o: $(SRCDIR)/miff.cpp
|
|
g++ $(GPP_FLAGS) $(SRCDIR)/miff.cpp -c -g -o $(OBJDIR)/miff.o
|
|
|
|
$(OBJDIR)/InputFileHandler.o: $(SRCDIR)/InputFileHandler.cpp
|
|
g++ $(GPP_FLAGS) $(SRCDIR)/InputFileHandler.cpp -c -g -o $(OBJDIR)/InputFileHandler.o
|
|
|
|
$(OBJDIR)/OutputFileHandler.o: $(SRCDIR)/OutputFileHandler.cpp
|
|
g++ $(GPP_FLAGS) $(SRCDIR)/OutputFileHandler.cpp -c -g -o $(OBJDIR)/OutputFileHandler.o
|
|
|
|
$(SRCDIR)/lex_yy.c: $(SRCDIR)/parser.lex
|
|
flex -w -o$(SRCDIR)/lex_yy.c $(SRCDIR)/parser.lex
|
|
|
|
$(SRCDIR)/parser.c $(SRCDIR)/parser.h: $(SRCDIR)/parser.yac
|
|
bison -d -o$(SRCDIR)/parser.c $(SRCDIR)/parser.yac
|
|
|
|
clean:
|
|
rm -f $(OBJS) $(SRCDIR)/parser.c $(SRCDIR)/parser.h $(SRCDIR)/lex_yy.c .depend
|
|
|
|
include .depend
|
|
|
|
.depend:
|
|
@echo Generating dependencies for miff
|
|
@touch .depend
|
|
@g++ -MM $(GPP_FLAGS) $(INCLUDE_DIRS) $(SRCDIR)/miff.cpp -c -g >> .depend
|
|
@g++ -MM $(GPP_FLAGS) $(INCLUDE_DIRS) $(SRCDIR)/InputFileHandler.cpp -c -g >> .depend
|
|
@g++ -MM $(GPP_FLAGS) $(INCLUDE_DIRS) $(SRCDIR)/OutputFileHandler.cpp -c -g >> .depend
|
|
|