Skip to content

Commit

Permalink
libusb pongoterm
Browse files Browse the repository at this point in the history
  • Loading branch information
Siguza committed Oct 4, 2021
1 parent 217eae6 commit ac3393f
Show file tree
Hide file tree
Showing 2 changed files with 492 additions and 218 deletions.
23 changes: 20 additions & 3 deletions scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,31 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#
ifndef $(HOST_OS)
ifeq ($(OS),Windows_NT)
HOST_OS = Windows
else
HOST_OS := $(shell uname -s)
endif
endif

ifeq ($(HOST_OS),Darwin)
C_FLAGS ?= -Wall -O3 -x objective-c $(CFLAGS)
LD_FLAGS ?= -framework Foundation -framework CoreFoundation -framework IOKit $(LDFLAGS)
else
ifeq ($(HOST_OS),Linux)
C_FLAGS ?= -Wall -O3 -DUSE_LIBUSB=1 $(CFLAGS)
LD_FLAGS ?= -lpthread -lusb-1.0 $(LDFLAGS)
endif
endif

.PHONY: all clean

all: pongoterm

pongoterm: pongoterm.m
$(CC) -o $@ $^ -Wall -O3 -framework Foundation -framework CoreFoundation -framework IOKit
pongoterm: pongoterm.c
$(CC) $(C_FLAGS) -o $@ $^ $(LD_FLAGS)

clean:
rm -f pongoterm
Loading

0 comments on commit ac3393f

Please sign in to comment.