Merge pull request #391 from xor-gate/st-probe
[fw/stlink] / Makefile.am
1 # Makefile.am -- Process this file with automake to produce Makefile.in
2
3 SUBDIRS = . $(MAYBE_GUI)
4
5 AUTOMAKE_OPTIONS = subdir-objects
6
7 if MINGW
8 bin_PROGRAMS = st-flash st-util st-info st-probe
9 else
10 bin_PROGRAMS = st-flash st-util st-term st-info st-probe
11 endif
12
13 noinst_LIBRARIES      = libstlink.a
14
15 st_flash_SOURCES = flash/main.c
16 st_term_SOURCES = src/st-term.c
17 st_info_SOURCES = src/st-info.c
18 st_probe_SOURCES = src/st-probe.c
19 st_util_SOURCES = gdbserver/gdb-remote.c gdbserver/gdb-remote.h gdbserver/gdb-server.c mingw/mingw.c mingw/mingw.h
20
21 CFILES = \
22         src/stlink-common.c \
23         src/stlink-usb.c \
24         src/stlink-sg.c \
25         src/uglylogging.c \
26         src/st-info.c
27
28 if !MINGW
29 CFILES += src/st-term.c
30 endif
31
32 HFILES  = \
33         src/stlink-common.h \
34         src/stlink-usb.h \
35         src/stlink-sg.h \
36         src/uglylogging.h \
37         src/mmap.h
38
39 libstlink_a_SOURCES     =       $(CFILES) $(HFILES)
40
41 libstlink_a_CPPFLAGS    = -std=gnu99 -Wall -Wextra -O2
42 libstlink_a_LIBADD = $(LIBOBJS)
43
44 st_flash_LDADD  =       libstlink.a
45 st_flash_CPPFLAGS       = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src -I$(top_srcdir)/mingw
46
47 st_util_LDADD   =       libstlink.a
48 st_util_CPPFLAGS        = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src -I$(top_srcdir)/mingw
49
50 st_term_LDADD   =       libstlink.a
51 st_term_CPPFLAGS        = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src -I$(top_srcdir)/mingw
52
53 st_info_LDADD   =       libstlink.a
54 st_info_CPPFLAGS        = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src -I$(top_srcdir)/mingw
55
56 st_probe_LDADD   =       libstlink.a
57 st_probe_CPPFLAGS       = -std=gnu99 -Wall -Wextra -O2 -I$(top_srcdir)/src -I$(top_srcdir)/mingw
58
59 EXTRA_DIST = autogen.sh