Skip to content
This repository
Browse code

autoconfiscate

  • Loading branch information...
commit 087a3596c3f22599867411fafb79fdfb3f48097c 1 parent 419b33f
Dave Murphy authored April 28, 2012
39  .gitignore
... ...
@@ -1,18 +1,23 @@
1  
-nbproject
2  
-.project
  1
+COPYING
  2
+INSTALL
  3
+Makefile.in
  4
+aclocal.m4
  5
+autom4te.cache
  6
+config.guess
  7
+config.sub
  8
+configure
  9
+depcomp
  10
+install-sh
  11
+ltmain.sh
  12
+missing
  13
+*.bz2
  14
+*.lo
3 15
 *.o
4  
-*.elf
5  
-doc/tutorial/*.log
6  
-doc/tutorial/*.aux
7  
-libstlink.a
8  
-test_usb
9  
-test_sg
10  
-gdbserver/st-util
11  
-flash/flash
12  
-*.log
13  
-example/*/*.bin
14  
-example/*/*.elf
15  
-example/*/*/*.bin
16  
-example/*/*/*/*.bin
17  
-example/*/*/*.a
18  
-example/*/*/*/*.a
  16
+.libs
  17
+libtool
  18
+*.la
  19
+config.log
  20
+config.status
  21
+compile
  22
+st-flash
  23
+st-util
0  ChangeLog
No changes.
58  Makefile
... ...
@@ -1,58 +0,0 @@
1  
-# make ... for both stlink v1 and stlink v2 support
2  
-##
3  
-VPATH=src
4  
-
5  
-SOURCES_LIB=stlink-common.c stlink-usb.c stlink-sg.c uglylogging.c
6  
-OBJS_LIB=$(SOURCES_LIB:.c=.o)
7  
-TEST_PROGRAMS=test_usb test_sg
8  
-LDFLAGS=-L. -lstlink 
9  
-
10  
-# libusb location
11  
-LDFLAGS+=`pkg-config --libs libusb-1.0`
12  
-CFLAGS+=`pkg-config --cflags libusb-1.0`
13  
-
14  
-CFLAGS+=-g
15  
-CFLAGS+=-DDEBUG=1
16  
-CFLAGS+=-std=gnu99
17  
-CFLAGS+=-Wall -Wextra
18  
-
19  
-
20  
-LIBRARY=libstlink.a
21  
-
22  
-all:  $(LIBRARY) flash gdbserver $(TEST_PROGRAMS)
23  
-
24  
-$(LIBRARY): $(OBJS_LIB)
25  
-	@echo "objs are $(OBJS_LIB)"
26  
-	$(AR) -cr $@ $^
27  
-	@echo "done making library"
28  
-	
29  
-
30  
-test_sg: test_sg.o $(LIBRARY)
31  
-	@echo "building test_sg"
32  
-	$(CC) test_sg.o $(LDFLAGS) -o $@
33  
-
34  
-test_usb: test_usb.o $(LIBRARY)
35  
-	@echo "building test_usb"
36  
-	$(CC) test_usb.o $(LDFLAGS) -o $@
37  
-	@echo "done linking"
38  
-
39  
-%.o: %.c
40  
-	@echo "building $^ into $@"
41  
-	$(CC) $(CFLAGS) -c $^ -o $@
42  
-	@echo "done compiling"
43  
-
44  
-clean:
45  
-	rm -rf $(OBJS_LIB)
46  
-	rm -rf $(LIBRARY)
47  
-	rm -rf test_usb*
48  
-	rm -rf test_sg*
49  
-	$(MAKE) -C flash clean
50  
-	$(MAKE) -C gdbserver clean
51  
-	
52  
-flash:
53  
-	$(MAKE) -C flash
54  
-
55  
-gdbserver:
56  
-	$(MAKE) -C gdbserver CONFIG_USE_LIBSG="$(CONFIG_USE_LIBSG)"
57  
-
58  
-.PHONY: clean all flash gdbserver
20  Makefile.am
... ...
@@ -0,0 +1,20 @@
  1
+# Makefile.am -- Process this file with automake to produce Makefile.in
  2
+bin_PROGRAMS = st-flash st-util
  3
+
  4
+noinst_LTLIBRARIES      = libstlink.la
  5
+
  6
+st_flash_SOURCES = flash/main.c
  7
+st_util_SOURCES = gdbserver/gdb-remote.c gdbserver/gdb-remote.h gdbserver/gdb-server.c
  8
+
  9
+libstlink_la_SOURCES	=	src/stlink-common.c src/stlink-usb.c src/stlink-sg.c src/uglylogging.c \
  10
+				src/stlink-common.h src/stlink-usb.h src/stlink-sg.h src/uglylogging.h
  11
+
  12
+libstlink_la_CPPFLAGS	= -std=gnu99 -Wall -Wextra -O2
  13
+
  14
+st_flash_LDADD	=	libstlink.la
  15
+st_flash_CPPFLAGS	= -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src
  16
+
  17
+st_util_LDADD	=	libstlink.la
  18
+st_util_CPPFLAGS	= -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src
  19
+
  20
+EXTRA_DIST = autogen.sh
0  NEWS
No changes.
11  autogen.sh
... ...
@@ -0,0 +1,11 @@
  1
+#!/bin/sh
  2
+if test ! "x$(which libtoolize)" = "x"; then
  3
+  echo "Running libtoolize"
  4
+  libtoolize --copy --force --automake
  5
+else
  6
+  if test ! "x$(which gintltoolize)" = "x"; then
  7
+    echo "Running glibtoolize"
  8
+    glibtoolize --copy --force --automake
  9
+  fi
  10
+fi
  11
+autoreconf --install --force --verbose
29  configure.ac
... ...
@@ -0,0 +1,29 @@
  1
+#                                               -*- Autoconf -*-
  2
+# Process this file with autoconf to produce a configure script.
  3
+
  4
+AC_PREREQ(2.61)
  5
+AC_INIT([stlink],[0.5.0],[davem@devkitpro.org])
  6
+AC_CONFIG_SRCDIR([src/stlink-common.c])
  7
+
  8
+AM_INIT_AUTOMAKE([1.10])
  9
+
  10
+
  11
+# Checks for programs.
  12
+AC_PROG_CC
  13
+AC_PROG_INSTALL
  14
+AC_CANONICAL_HOST
  15
+AC_CANONICAL_BUILD
  16
+AC_PROG_LIBTOOL
  17
+AM_PROG_CC_C_O
  18
+
  19
+# Checks for libraries.
  20
+PKG_CHECK_MODULES(USB, libusb-1.0 >= 1.0.0,,
  21
+                 AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***]))
  22
+AC_CHECK_LIB([usbpath],[usb_path2devnum],,,-lusb)
  23
+
  24
+LIBS="$LIBS $USB_LIBS"
  25
+CFLAGS="$CFLAGS $USB_CFLAGS"
  26
+
  27
+AC_CONFIG_FILES([Makefile])
  28
+AC_OUTPUT
  29
+

0 notes on commit 087a359

Please sign in to comment.
Something went wrong with that request. Please try again.