Skip to content

Commit

Permalink
init upload
Browse files Browse the repository at this point in the history
  • Loading branch information
trlsmax committed Jun 25, 2018
1 parent 7b66971 commit 7b5ee1d
Show file tree
Hide file tree
Showing 54 changed files with 7,272 additions and 51 deletions.
51 changes: 0 additions & 51 deletions .gitignore

This file was deleted.

43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
ifeq ($(OS),Windows_NT)
TARGET = rtt_stlink.exe
CC = i686-w64-mingw32-gcc
LINKER = i686-w64-mingw32-g++
RM=del
INC_IUP = ./include/iup
LD_LIB = ./lib/win_32
else
TARGET = rtt_stlink
CC = gcc
LINKER = g++
RM=rm
LBITS := $(shell getconf LONG_BIT)
ifeq ($(LBITS),64)
INC_IUP = ./include/iup
LD_LIB = ./lib/linux_64
else
INC_IUP = ./include/iup
LD_LIB = ./lib/linux_86
endif
endif
C_FLAG = -I. -I./include -I$(INC_IUP) -c -std=c99
L_FLAG = $(LD_LIB)/libiup.a $(LD_LIB)/libstlink.a $(LD_LIB)/libusb-1.0.a
ifeq ($(OS),Windows_NT)
L_FLAG += -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lsetupapi -mwindows -static
else
ifeq ($(LBITS),64)
L_FLAG += $(shell pkg-config --libs gtk+-3.0 gdk-3.0)
else
L_FLAG += $(shell pkg-config --libs gtk+-2.0 gdk-2.0)
endif
L_FLAG += -lX11 -lpthread -ludev
endif

$(TARGET):rtt_stlink.o
$(LINKER) $^ $(L_FLAG) -o $(TARGET)

rtt_stlink.o:rtt_stlink.c
$(CC) $^ $(C_FLAG)

clean:
$(RM) -f *.o
$(RM) -f $(TARGET)
Loading

0 comments on commit 7b5ee1d

Please sign in to comment.