diff options
| author | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-04-06 10:11:07 +0800 |
|---|---|---|
| committer | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-04-06 10:11:07 +0800 |
| commit | f3e040230772f978540a71aea43dfde200992922 (patch) | |
| tree | bd8ca31b72dd01e24980b073854e263589530f56 /tools/lzpack/makefile | |
| download | psn00bsdk-f3e040230772f978540a71aea43dfde200992922.tar.gz | |
First commit
Diffstat (limited to 'tools/lzpack/makefile')
| -rw-r--r-- | tools/lzpack/makefile | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tools/lzpack/makefile b/tools/lzpack/makefile new file mode 100644 index 0000000..e11f5c7 --- /dev/null +++ b/tools/lzpack/makefile @@ -0,0 +1,46 @@ +TARGET := lzpack + +CPPFILES = main.cpp filelist.cpp +CFLAGS = -O2 +LDFLAGS = -s + +LIBS = -ltinyxml2 -llzp + +CC = gcc +CXX = g++ + +OFILES = $(addprefix build/,$(CPPFILES:.cpp=.o)) + +ifeq "$(OS)" "Windows_NT" + +# Config for Windows +INCLUDE = -I/c/tinyxml2 +LIBDIRS = -L/c/tinyxml2 +TARGET := $(TARGET).exe + +else + +# Config for anything else that isn't Linux + +endif + +INCLUDE += -I../../libpsn00b +LIBDIRS += -Llzp + +build/%.o: %.cpp + @mkdir -p $(dir $@) + $(CXX) $(CFLAGS) $(INCLUDE) -c $< -o $@ + +all: $(OFILES) + $(MAKE) -C lzp + $(CXX) $(CFLAGS) $(LDFLAGS) $(LIBDIRS) $(OFILES) $(LIBS) -o $(TARGET) + +install: + mkdir -p ../bin + cp $(TARGET) ../bin/$(TARGET) + +clean: + $(MAKE) -C lzp clean + rm -Rf build $(TARGET) + +cleanall: clean |
