aboutsummaryrefslogtreecommitdiff
path: root/tools/lzpack
diff options
context:
space:
mode:
authorspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2021-09-12 19:39:17 +0200
committerspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2021-09-12 19:39:17 +0200
commitcea06fba6de344333365d7ee623ad30d152636a6 (patch)
treef546036c96bb16d50c6879d09e3a597a2b42b6b1 /tools/lzpack
parent375322773f1961fe69699ac5691775235b0b39c5 (diff)
downloadpsn00bsdk-cea06fba6de344333365d7ee623ad30d152636a6.tar.gz
Migrated tools to CMake
Diffstat (limited to 'tools/lzpack')
-rw-r--r--tools/lzpack/lzp/makefile30
-rw-r--r--tools/lzpack/main.cpp4
-rw-r--r--tools/lzpack/makefile46
3 files changed, 2 insertions, 78 deletions
diff --git a/tools/lzpack/lzp/makefile b/tools/lzpack/lzp/makefile
deleted file mode 100644
index 83da67d..0000000
--- a/tools/lzpack/lzp/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-# This LZP library builds off the lzp sources in libpsn00b/lzp. The only
-# difference is this is built with compression enabled specified in the
-# lzconfig.h file and the library is built for the host platform.
-
-TARGET = liblzp.a
-
-CFILES = $(wildcard ../../../libpsn00b/lzp/*.c)
-OFILES = $(addprefix build/, $(notdir $(CFILES:.c=.o)))
-
-INCLUDE = -I../include -I.
-
-CFLAGS = -g -O2
-
-CC = $(PREFIX)gcc
-AR = $(PREFIX)ar
-RANLIB = $(PREFIX)ranlib
-
-all: $(TARGET)
-
-$(TARGET): $(OFILES)
- $(AR) cr $(TARGET) $(OFILES)
- $(RANLIB) $(TARGET)
-
-# Dunno if there's a better way to do this but it works at least
-build/%.o: ../../../libpsn00b/lzp/%.c
- @mkdir -p $(dir $@)
- $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
-
-clean:
- rm -Rf build $(TARGET) \ No newline at end of file
diff --git a/tools/lzpack/main.cpp b/tools/lzpack/main.cpp
index 801cdd1..e57117e 100644
--- a/tools/lzpack/main.cpp
+++ b/tools/lzpack/main.cpp
@@ -1,8 +1,8 @@
#include <stdio.h>
#include <tinyxml2.h>
-#include "lzp/lzconfig.h"
-#include "lzp/lzp.h"
+#include "lzconfig.h"
+#include "lzp.h"
#include "filelist.h"
diff --git a/tools/lzpack/makefile b/tools/lzpack/makefile
deleted file mode 100644
index e11f5c7..0000000
--- a/tools/lzpack/makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-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