Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

autoconfiscate

  • Loading branch information...
commit 087a3596c3f22599867411fafb79fdfb3f48097c 1 parent 419b33f
@WinterMute WinterMute authored
View
39 .gitignore
@@ -1,18 +1,23 @@
-nbproject
-.project
+COPYING
+INSTALL
+Makefile.in
+aclocal.m4
+autom4te.cache
+config.guess
+config.sub
+configure
+depcomp
+install-sh
+ltmain.sh
+missing
+*.bz2
+*.lo
*.o
-*.elf
-doc/tutorial/*.log
-doc/tutorial/*.aux
-libstlink.a
-test_usb
-test_sg
-gdbserver/st-util
-flash/flash
-*.log
-example/*/*.bin
-example/*/*.elf
-example/*/*/*.bin
-example/*/*/*/*.bin
-example/*/*/*.a
-example/*/*/*/*.a
+.libs
+libtool
+*.la
+config.log
+config.status
+compile
+st-flash
+st-util
View
0  ChangeLog
No changes.
View
58 Makefile
@@ -1,58 +0,0 @@
-# make ... for both stlink v1 and stlink v2 support
-##
-VPATH=src
-
-SOURCES_LIB=stlink-common.c stlink-usb.c stlink-sg.c uglylogging.c
-OBJS_LIB=$(SOURCES_LIB:.c=.o)
-TEST_PROGRAMS=test_usb test_sg
-LDFLAGS=-L. -lstlink
-
-# libusb location
-LDFLAGS+=`pkg-config --libs libusb-1.0`
-CFLAGS+=`pkg-config --cflags libusb-1.0`
-
-CFLAGS+=-g
-CFLAGS+=-DDEBUG=1
-CFLAGS+=-std=gnu99
-CFLAGS+=-Wall -Wextra
-
-
-LIBRARY=libstlink.a
-
-all: $(LIBRARY) flash gdbserver $(TEST_PROGRAMS)
-
-$(LIBRARY): $(OBJS_LIB)
- @echo "objs are $(OBJS_LIB)"
- $(AR) -cr $@ $^
- @echo "done making library"
-
-
-test_sg: test_sg.o $(LIBRARY)
- @echo "building test_sg"
- $(CC) test_sg.o $(LDFLAGS) -o $@
-
-test_usb: test_usb.o $(LIBRARY)
- @echo "building test_usb"
- $(CC) test_usb.o $(LDFLAGS) -o $@
- @echo "done linking"
-
-%.o: %.c
- @echo "building $^ into $@"
- $(CC) $(CFLAGS) -c $^ -o $@
- @echo "done compiling"
-
-clean:
- rm -rf $(OBJS_LIB)
- rm -rf $(LIBRARY)
- rm -rf test_usb*
- rm -rf test_sg*
- $(MAKE) -C flash clean
- $(MAKE) -C gdbserver clean
-
-flash:
- $(MAKE) -C flash
-
-gdbserver:
- $(MAKE) -C gdbserver CONFIG_USE_LIBSG="$(CONFIG_USE_LIBSG)"
-
-.PHONY: clean all flash gdbserver
View
20 Makefile.am
@@ -0,0 +1,20 @@
+# Makefile.am -- Process this file with automake to produce Makefile.in
+bin_PROGRAMS = st-flash st-util
+
+noinst_LTLIBRARIES = libstlink.la
+
+st_flash_SOURCES = flash/main.c
+st_util_SOURCES = gdbserver/gdb-remote.c gdbserver/gdb-remote.h gdbserver/gdb-server.c
+
+libstlink_la_SOURCES = src/stlink-common.c src/stlink-usb.c src/stlink-sg.c src/uglylogging.c \
+ src/stlink-common.h src/stlink-usb.h src/stlink-sg.h src/uglylogging.h
+
+libstlink_la_CPPFLAGS = -std=gnu99 -Wall -Wextra -O2
+
+st_flash_LDADD = libstlink.la
+st_flash_CPPFLAGS = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src
+
+st_util_LDADD = libstlink.la
+st_util_CPPFLAGS = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src
+
+EXTRA_DIST = autogen.sh
View
0  NEWS
No changes.
View
11 autogen.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+if test ! "x$(which libtoolize)" = "x"; then
+ echo "Running libtoolize"
+ libtoolize --copy --force --automake
+else
+ if test ! "x$(which gintltoolize)" = "x"; then
+ echo "Running glibtoolize"
+ glibtoolize --copy --force --automake
+ fi
+fi
+autoreconf --install --force --verbose
View
29 configure.ac
@@ -0,0 +1,29 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.61)
+AC_INIT([stlink],[0.5.0],[davem@devkitpro.org])
+AC_CONFIG_SRCDIR([src/stlink-common.c])
+
+AM_INIT_AUTOMAKE([1.10])
+
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_CANONICAL_HOST
+AC_CANONICAL_BUILD
+AC_PROG_LIBTOOL
+AM_PROG_CC_C_O
+
+# Checks for libraries.
+PKG_CHECK_MODULES(USB, libusb-1.0 >= 1.0.0,,
+ AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***]))
+AC_CHECK_LIB([usbpath],[usb_path2devnum],,,-lusb)
+
+LIBS="$LIBS $USB_LIBS"
+CFLAGS="$CFLAGS $USB_CFLAGS"
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+
Please sign in to comment.
Something went wrong with that request. Please try again.