From fbcd5de5ff2f37ee5b4e30b4a05888e251e2bc21 Mon Sep 17 00:00:00 2001 From: beyondcoast Date: Sun, 25 Nov 2018 13:02:53 -0600 Subject: [PATCH] Reference shared/*.h using compiler flag, remove need to copy files to build host application. Remove related content in .git_ignore. --- .gitignore | 1 - host/Makefile | 14 ++++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index a0e279c..e267f26 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ # ignore shared files that have been copied to host-firmware dirs firmware/source/shared_*.h -host/source/shared_*.h # ignore trash/temp files stored in host/ignore host/ignore diff --git a/host/Makefile b/host/Makefile index d442744..f9c4fc0 100644 --- a/host/Makefile +++ b/host/Makefile @@ -1,6 +1,6 @@ #compiler flags: -Wall Warnings all, -g gdb debug markings, CFLAGS=-Wall -O -INCLUDE= -I ./include +INCLUDE= -I ./include -I ../shared WINLIB= -L ./winlib LIBUSB= -lusb-1.0 CC= gcc @@ -13,12 +13,12 @@ LUAOBJ=$(wildcard source/lua/*.o) TARGET=inlretro #default to windows build -all: shared +all: $(CC) $(INCLUDE) $(LUAOBJ) $(SOURCES) -o $(TARGET) $(WINLIB) $(CFLAGS) $(LIBUSB) #unix build doesn't need winlib directory as libusb should be installed on OS. #sudo apt-get install libusb-1.0-0-dev -unix: shared +unix: $(CC) $(INCLUDE) $(LUAOBJ) $(SOURCES) -o $(TARGET) $(CFLAGS) -lm $(LIBUSB) # "make debug" will build program with debug print messages @@ -32,12 +32,6 @@ unixdebug: CFLAGS += -DDEBUG -g unixdebug: unix -#copy shared .h files which are used in host and firmware -shared: - cp -r ../shared/* source/ - #clean on unix and windows(.exe) clean: - rm -f $(TARGET) $(TARGET).exe $(OBJECTS) $(LUAOBJ) - rm -f source/shared_* - + rm -f $(TARGET) $(TARGET).exe $(OBJECTS) $(LUAOBJ) \ No newline at end of file