Merge pull request #415 from texane/chipid_refactor
[fw/stlink] / Makefile.am
index 2ddbf475dc89ea77bab6147ee6577fb037a7165b..a3114c6e4799e8dcc8c20c4090929272e27fdfe6 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile.am -- Process this file with automake to produce Makefile.in
 
-SUBDIRS = . $(MAYBE_GUI)
+SUBDIRS = . $(STLINK_HAS_GUI)
 
 AUTOMAKE_OPTIONS = subdir-objects
 
@@ -12,46 +12,45 @@ endif
 
 noinst_LIBRARIES      = libstlink.a
 
-st_flash_SOURCES = flash/main.c
-st_term_SOURCES = src/st-term.c
-st_info_SOURCES = src/st-info.c
-st_util_SOURCES = gdbserver/gdb-remote.c gdbserver/gdb-remote.h gdbserver/gdb-server.c mingw/mingw.c mingw/mingw.h
+st_flash_SOURCES = src/tools/flash.c
+st_term_SOURCES = src/tools/term.c
+st_info_SOURCES = src/tools/info.c
+st_util_SOURCES = src/gdbserver/gdb-remote.c src/gdbserver/gdb-remote.h src/gdbserver/gdb-server.c src/mingw/mingw.c src/mingw/mingw.h
 
 CFILES = \
-       src/stlink-common.c \
-       src/stlink-usb.c \
-       src/stlink-sg.c \
-       src/uglylogging.c \
-       src/st-info.c
+       src/chipid.c \
+       src/common.c \
+       src/usb.c \
+       src/sg.c \
+       src/logging.c
 
 if !MINGW
-CFILES += src/st-term.c
+CFILES += src/tools/term.c
 endif
 
 HFILES = \
-       src/stlink-common.h \
-       src/stlink-usb.h \
-       src/stlink-sg.h \
-       src/uglylogging.h \
-       src/mmap.h
+       include/stlink.h \
+       include/stlink/chipid.h \
+       include/stlink/usb.h \
+       include/stlink/sg.h \
+       include/stlink/logging.h \
+       include/stlink/mmap.h
 
 libstlink_a_SOURCES    =       $(CFILES) $(HFILES)
 
-libstlink_a_CPPFLAGS   = -std=gnu99 -Wall -Wextra -O2
 libstlink_a_LIBADD = $(LIBOBJS)
+libstlink_a_CPPFLAGS   = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/include
 
 st_flash_LDADD =       libstlink.a
-st_flash_CPPFLAGS      = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src -I$(top_srcdir)/mingw
+st_flash_CPPFLAGS      = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/include -I$(top_srcdir)/src/mingw
 
 st_util_LDADD  =       libstlink.a
-st_util_CPPFLAGS       = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src -I$(top_srcdir)/mingw
+st_util_CPPFLAGS       = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/include -I$(top_srcdir)/src/mingw
 
 st_term_LDADD   =       libstlink.a
-st_term_CPPFLAGS        = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src -I$(top_srcdir)/mingw
+st_term_CPPFLAGS        = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/include -I$(top_srcdir)/src/mingw
 
 st_info_LDADD   =       libstlink.a
-st_info_CPPFLAGS        = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src -I$(top_srcdir)/mingw
-
+st_info_CPPFLAGS        = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/include -I$(top_srcdir)/src/mingw
 
 EXTRA_DIST = autogen.sh
-