1
0
mirror of https://github.com/preble/libpinproc synced 2026-02-24 18:25:23 +01:00

First pass at handmade Makefiles.

This commit is contained in:
preble
2010-05-31 00:04:15 -04:00
parent c29a6daa48
commit 3d265e7bbf
3 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
CC = g++
RM = rm -f
CFLAGS = $(ARCH) -c -Wall -I../../include
LDFLAGS = $(ARCH) -L../../bin
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
PINPROCTEST = ../../bin/pinproctest
LIBPINPROC = ../../bin/libpinproc.a
SRCS = pinproctest.cpp drivers.cpp dmd.cpp switches.cpp
OBJS := $(SRCS:.cpp=.o)
INCLUDES = ../../include/pinproc.h
LIBS = usb pinproc yaml-cpp
ifneq ($(uname_s),Windows) # not Windows
LIBS += ftdi
endif
ifeq ($(uname_s),Windows)
LIBS = ftd2xx
endif
pinproctest: $(PINPROCTEST)
$(PINPROCTEST): $(OBJS) $(LIBPINPROC)
$(CC) $(LDFLAGS) $(OBJS) $(addprefix -l,$(LIBS)) -o $@
.cpp.o:
$(CC) $(CFLAGS) -o $@ $<
clean:
$(RM) $(OBJS)
.PHONY: clean pinproctest
depend: $(SRCS)
makedepend $(INCLUDES) $^
# DO NOT DELETE THIS LINE -- make depend needs it
pinproctest.o: pinproctest.h ../../include/pinproc.h
drivers.o: pinproctest.h ../../include/pinproc.h
dmd.o: pinproctest.h ../../include/pinproc.h
switches.o: pinproctest.h ../../include/pinproc.h