From faea6b5ebe5ccf545f5babef31bf20164f963be1 Mon Sep 17 00:00:00 2001 From: fincs Date: Wed, 10 Dec 2014 22:28:45 +0100 Subject: [PATCH] Autoconfiscate; this is required by the devkitARM build process --- .gitignore | 23 ++++++++++++++++ Makefile | 78 ---------------------------------------------------- Makefile.am | 9 ++++++ README.md | 6 +++- autogen.sh | 4 +++ clean.sh | 3 ++ configure.ac | 17 ++++++++++++ 7 files changed, 61 insertions(+), 79 deletions(-) delete mode 100644 Makefile create mode 100644 Makefile.am create mode 100644 autogen.sh create mode 100644 clean.sh create mode 100644 configure.ac diff --git a/.gitignore b/.gitignore index dc3267e..67de2ec 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,26 @@ *.vsh.h *.bat build/ + +# The following is bullshit generated and/or required by autotools + +NEWS +README +AUTHORS +ChangeLog +INSTALL +Makefile.in +aclocal.m4 +autom4te.cache +config.guess +config.sub +configure +depcomp +install-sh +missing +config.log +config.status +Makefile +picasso +.deps/ +*.bz2 diff --git a/Makefile b/Makefile deleted file mode 100644 index c51f388..0000000 --- a/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# This Makefile was blatantly ripped off from the devkitPro project - -.SUFFIXES: - -TARGET := $(notdir $(CURDIR)) -BUILD := build -SOURCES := source - -export CC := gcc -export CXX := g++ -export STRIP := strip - -CFLAGS := -g0 -Wall -O2 -CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++0x - -LDFLAGS := -g0 - -UNAME := $(shell uname -s) - -ifneq (,$(findstring MINGW,$(UNAME))) - EXEEXT := .exe -endif - -ifneq (,$(findstring Darwin,$(UNAME))) - SDK := /Developer/SDKs/MacOSX10.4u.sdk - OSXCFLAGS := -mmacosx-version-min=10.4 -isysroot $(SDK) -arch i386 -arch ppc - OSXCXXFLAGS := -fvisibility=hidden -mmacosx-version-min=10.4 -isysroot $(SDK) -arch i386 -arch ppc - OSXLDFLAGS := -mmacosx-version-min=10.4 -Wl,-syslibroot,$(SDK) -arch i386 -arch ppc -endif - -ifneq ($(BUILD),$(notdir $(CURDIR))) - -export OUTPUT := $(CURDIR)/$(TARGET)$(EXEEXT) -export DEPSDIR := $(CURDIR)/$(BUILD) -export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) - -CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) -CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) - -ifeq ($(strip $(CPPFILES)),) - export LD := $(CC) -else - export LD := $(CXX) -endif - -export OFILES := $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) - -.PHONY: $(BUILD) clean - -$(BUILD): - @[ -d $@ ] || mkdir -p $@ - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile - -clean: - @rm -fr $(BUILD) $(OUTPUT) - -else - -$(OUTPUT): $(OFILES) - --include $(DEPSDIR)/*.d - -$(OUTPUT): - @echo Linking... - @$(LD) $(OSXLDFLAGS) $(LDFLAGS) $(OFILES) -o $@ - @$(STRIP) $@ - -%.o: %.c - @echo $(notdir $<) - @$(CC) -E -MMD -MF $(DEPSDIR)/$(*).d $(CFLAGS) $< > /dev/null - @$(CC) $(OSXCFLAGS) $(CFLAGS) -o $@ -c $< - -%.o: %.cpp - @echo $(notdir $<) - @$(CXX) -E -MMD -MF $(DEPSDIR)/$(*).d $(CXXFLAGS) $< > /dev/null - @$(CXX) $(OSXCXXFLAGS) $(CXXFLAGS) -o $@ -c $< - -endif diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..89e0a46 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,9 @@ +# Makefile.am -- Process this file with automake to produce Makefile.in +bin_PROGRAMS = picasso + +_common_SOURCES = source/FileClass.h source/maestro_opcodes.h source/types.h +picasso_SOURCES = source/picasso_assembler.cpp source/picasso_frontend.cpp source/picasso.h $(_common_SOURCES) +picasso_CXXFLAGS = + + +EXTRA_DIST = autogen.sh diff --git a/README.md b/README.md index 7b2a977..a3c1413 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,11 @@ Currently there's no documentation; refer to `example.vsh` in order to figure ou ## Building -A working C++11 compiler for the host is required (Windows users: use TDM-GCC). Use `make` to build the program. +A working C++ compiler for the host is required (Windows users: use TDM-GCC), plus autotools. Use the following commands to build the program: + + ./autogen.sh + ./configure + make ## Shout-outs diff --git a/autogen.sh b/autogen.sh new file mode 100644 index 0000000..e180146 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,4 @@ +touch NEWS README AUTHORS ChangeLog +aclocal +autoconf +automake --add-missing -c diff --git a/clean.sh b/clean.sh new file mode 100644 index 0000000..0e142e1 --- /dev/null +++ b/clean.sh @@ -0,0 +1,3 @@ + +# This script removes bullshit generated and/or required by autotools; as well as object/binary files +rm -rf .deps autom4te.cache aclocal.m4 AUTHORS ChangeLog config.* configure depcomp INSTALL install-sh Makefile Makefile.in missing NEWS picasso *.exe *.o README diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..1a7ba6c --- /dev/null +++ b/configure.ac @@ -0,0 +1,17 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.61) +AC_INIT([picasso],[1.0.0],[fincs.alt1@gmail.com]) +AC_CONFIG_SRCDIR([source/picasso_frontend.cpp]) + +AM_INIT_AUTOMAKE([1.10]) + +AC_CANONICAL_BUILD +AC_CANONICAL_HOST + +AC_PROG_CC +AC_PROG_CXX + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT