Permalink
Browse files

Update Commit

- cancelled plans for GUI terminal... reverted makefile!
- fixed compiler warning for /* inside comments...
- added VERSION file...
  • Loading branch information...
1 parent 84e968d commit ae3101c31d422f4c6be9e018ad38c08f3d2c1436 @azman committed Oct 21, 2012
Showing with 15 additions and 50 deletions.
  1. +1 −0 VERSION
  2. +10 −46 makefile
  3. +4 −4 src/my1comlib.c
View
@@ -0,0 +1 @@
+1.2.0
View
@@ -3,8 +3,6 @@
PROJECT = my1termu
CONSPRO = $(PROJECT)
CONSOBJ = my1cons.o my1comlib.o my1comport.o $(CONSPRO).o
-GUISPRO = my1termw
-GUISOBJ = my1comlib.o my1comport.o wxform.o wxmain.o
TESTPRO = my1console
TESTOBJ = my1cons.o $(TESTPRO).o
@@ -17,21 +15,14 @@ DELETE = rm -rf
COPY = cp -R
ARCHIVE = tar cjf
ARCHEXT = .tar.bz2
-CONVERT = convert
-CFLAGS += -Wall
+CFLAGS += -Wall --static
LFLAGS +=
OFLAGS +=
-LOCAL_FLAGS =
-WX_LIBS = stc,aui,html,adv,core,xml,base
-WX_LIBFLAGS = $(shell wx-config --libs $(WX_LIBS))
-WX_CXXFLAGS = $(shell wx-config --cxxflags)
ifeq ($(DO_MINGW),YES)
CONSPRO = $(CONSPRO).exe
- GUISPRO = $(GUISPRO).exe
TESTPRO = $(TESTPRO).exe
- GUISOBJ += wxmain.res
PLATBIN = mingw
ARCHIVE = zip -r
ARCHEXT = .zip
@@ -40,30 +31,20 @@ ifeq ($(DO_MINGW),YES)
XTOOL_TARGET = $(XTOOL_DIR)
CROSS_COMPILE = $(XTOOL_TARGET)/bin/i686-pc-mingw32-
# extra switches
- CFLAGS += -I$(XTOOL_DIR)/include --static -DDO_MINGW -DWIN32_LEAN_AND_MEAN
+ CFLAGS += -I$(XTOOL_DIR)/include -DDO_MINGW
LFLAGS += -L$(XTOOL_DIR)/lib
- # below is to remove console at runtime - do we really need this??
- LFLAGS += -Wl,-subsystem,windows
- # can't remember why, but '-mthreads' is not playing nice with others - has to go!
- WX_LIBFLAGS = $(shell $(XTOOL_DIR)/bin/wx-config --libs $(WX_LIBS) | sed 's/-mthreads//g')
- WX_CXXFLAGS = $(shell $(XTOOL_DIR)/bin/wx-config --cxxflags | sed 's/-mthreads//g')
- # include for resource compilation!
- WINDRES_FLAG = --include-dir $(XTOOL_DIR)/include --include-dir $(XTOOL_DIR)/include/wx-2.9
endif
-PACKDAT += $(GUISPRO) $(CONSPRO) $(TESTPRO)
+PACKDAT += $(CONSPRO) $(TESTPRO)
CC = $(CROSS_COMPILE)gcc
CPP = $(CROSS_COMPILE)g++
-RES = $(CROSS_COMPILE)windres
-debug: LOCAL_FLAGS += -DMY1DEBUG
+debug: CFLAGS += -DMY1DEBUG
pack: ARCNAME = $(PACKDIR)-$(PLATBIN)-$(shell date +%Y%m%d)$(ARCHEXT)
version: VERSION = -DMY1APP_PROGVERS=\"$(shell cat VERSION)\"
-all: main
-
main: $(CONSPRO)
-gui: $(GUISPRO)
+all: main test
test: $(TESTPRO)
@@ -77,42 +58,25 @@ pack: version
$(DELETE) $(ARCNAME)
$(ARCHIVE) $(ARCNAME) $(PACKDIR)
-pack-exe: pack
-
version: new
$(CONSPRO): $(CONSOBJ)
$(CC) $(CFLAGS) -o $@ $+ $(LFLAGS) $(OFLAGS)
-$(GUISPRO): $(GUISOBJ)
- $(CPP) $(CFLAGS) -o $@ $+ $(LFLAGS) $(OFLAGS) $(WX_LIBFLAGS)
-
$(TESTPRO): $(TESTOBJ)
$(CC) $(CFLAGS) -o $@ $+ $(LFLAGS) $(OFLAGS)
%.o: src/%.c src/%.h
- $(CC) $(CFLAGS) $(LOCAL_FLAGS) -c $<
+ $(CC) $(CFLAGS) -c $<
%.o: src/%.c
- $(CC) $(CFLAGS) $(LOCAL_FLAGS) -c $<
+ $(CC) $(CFLAGS) -c $<
%.o: src/%.cpp src/%.hpp
- $(CPP) $(CFLAGS) $(LOCAL_FLAGS) -c $<
+ $(CPP) $(CFLAGS) -c $<
%.o: src/%.cpp
- $(CPP) $(CFLAGS) $(LOCAL_FLAGS) -c $<
-
-wx%.o: src/wx%.cpp src/wx%.hpp
- $(CPP) $(CFLAGS) $(VERSION) $(WX_CXXFLAGS) -c $<
-
-wx%.o: src/wx%.cpp
- $(CPP) $(CFLAGS) $(VERSION) $(WX_CXXFLAGS) -c $<
-
-%.ico: res/%.xpm
- $(CONVERT) $< $@
-
-%.res: src/%.rc apps.ico
- $(RES) --include-dir res $(WINDRES_FLAG) -O COFF $< -o $@
+ $(CPP) $(CFLAGS) -c $<
clean:
- -$(DELETE) $(TESTPRO) $(CONSPRO) $(GUISPRO) $(PACKDIR) *.exe *.bz2 *.zip *.o *.ico *.res
+ -$(DELETE) $(TESTPRO) $(CONSPRO) $(PACKDIR) *.exe *.bz2 *.zip *.o
View
@@ -8,7 +8,7 @@
#endif
/*----------------------------------------------------------------------------*/
#ifdef DO_MINGW
-/* #define COM_PORT_NAME "\\\\.\\COM" /* -> "\\" is ONE \ char! */
+/* #define COM_PORT_NAME "\\\\.\\COM" / * -> "\\" is ONE \ char! */
#define COM_PORT_NAME "COM"
#else
#define COM_PORT_NAME "/dev/ttyS"
@@ -43,9 +43,9 @@ void initialize_serial(ASerialPort_t* aPort)
/* configure 9600,N81 for ttyS */
cfsetispeed(&aPort->mTIO, cBaudRate);
cfsetospeed(&aPort->mTIO, cBaudRate);
- /* aPort->mTIO.c_cflag |= PARENB; /* enable parity */
- /* aPort->mTIO.c_cflag |= PARODD; /* use odd-parity, else even */
- /* aPort->mTIO.c_cflag |= CSTOPB; /* 2 stop bit, else 1 */
+ /* aPort->mTIO.c_cflag |= PARENB; / * enable parity */
+ /* aPort->mTIO.c_cflag |= PARODD; / * use odd-parity, else even */
+ /* aPort->mTIO.c_cflag |= CSTOPB; / * 2 stop bit, else 1 */
aPort->mTIO.c_cflag &= ~CSIZE; /* clear size */
aPort->mTIO.c_cflag |= CS8; /* set 8-bit char */
aPort->mTIO.c_cflag |= CLOCAL; /* ignore modem control */

0 comments on commit ae3101c

Please sign in to comment.