Reference shared/*.h using compiler flag, remove need to copy files to build host application. Remove related content in .git_ignore.

This commit is contained in:
beyondcoast 2018-11-25 13:02:53 -06:00
parent 970e031662
commit fbcd5de5ff
2 changed files with 4 additions and 11 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -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)